/*
 Theme Name:   Lugan81
 Theme URI:    https://lugan81.kelly.ovh
 Description:  Thème WordPress pour le site officiel de la Mairie de Lugan (81)
 Author:       Michaël Vander Heyden
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  lugan81
 Tags:         municipality, one-column, custom-menu, custom-logo, featured-images
*/

/* ============================================
   LUGAN81 — WordPress Theme
   ============================================ */

:root {
    --primary: #1a5276;
    --primary-dark: #0e3a56;
    --primary-light: #2980b9;
    --accent: #e67e22;
    --accent-light: #f39c12;
    --success: #27ae60;
    --danger: #e74c3c;
    --info: #3498db;
    --bg: #ffffff;
    --bg-alt: #f4f7fa;
    --bg-dark: #1a2332;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --text-white: #ecf0f1;
    --border: #dfe6e9;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
}

.container, .site-content .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; }

/* ---- TOP BAR ---- */
.top-bar {
    background: var(--bg-dark);
    color: var(--text-white);
    font-size: 0.82rem;
    padding: 8px 0;
}
.top-bar .container {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}
.top-bar span { opacity: 0.85; }

/* ---- HEADER ---- */
.site-header {
    background: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.site-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}
.site-branding a { color: var(--text); text-decoration: none; }
.site-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    line-height: 1.2;
}
.site-description {
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 0;
}

/* NAVIGATION */
.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 4px;
    margin: 0;
    padding: 0;
}
.main-navigation a {
    display: block;
    padding: 8px 14px;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background: var(--bg-alt);
    color: var(--primary);
}

/* DROPDOWN */
.main-navigation li { position: relative; }
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    min-width: 220px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    z-index: 100;
}
.main-navigation li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-navigation ul ul a {
    padding: 10px 20px;
    font-size: 0.88rem;
}
.main-navigation ul ul a:hover { background: var(--bg-alt); }

/* MOBILE TOGGLE */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 968px) {
    .menu-toggle { display: flex; }
    .main-navigation {
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        box-shadow: var(--shadow-hover);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
    }
    .main-navigation.toggled { max-height: 600px; overflow-y: auto; }
    .main-navigation ul { flex-direction: column; padding: 16px 20px; }
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 20px;
    }
}

/* ---- HERO ---- */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 100px 0 120px;
    text-align: center;
    overflow: hidden;
}
.hero-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 16px;
    font-weight: 600;
}
.hero-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
}
.btn-primary {
    background: var(--accent);
    color: white !important;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230,126,34,0.3);
}
.btn-outline {
    background: transparent;
    color: white !important;
    border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* ---- QUICK INFO ---- */
.quick-info {
    margin-top: -50px;
    position: relative;
    z-index: 10;
    padding-bottom: 40px;
}
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.info-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform var(--transition), box-shadow var(--transition);
}
.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.info-icon { font-size: 2.5rem; margin-bottom: 12px; }
.info-card h3 { color: var(--primary); margin-bottom: 12px; font-size: 1.05rem; }
.info-card ul { list-style: none; font-size: 0.92rem; padding: 0; }
.info-card li { padding: 4px 0; }
.info-card p { font-size: 0.92rem; color: var(--text-light); }

/* ---- SECTIONS ---- */
.section { padding: 80px 0; }
.section--alt { background: var(--bg-alt); }
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 48px;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* ---- NEWS / POSTS ---- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}
.news-card {
    background: white;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 4px solid var(--info);
}
.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}
.news-card h3 { font-size: 1.1rem; line-height: 1.3; }
.news-card h3 a { color: var(--text); }
.news-card h3 a:hover { color: var(--primary); }
.news-card p, .news-card .entry-summary { font-size: 0.9rem; color: var(--text-light); flex: 1; }
.news-card .entry-meta { font-size: 0.8rem; color: var(--text-light); }

/* ---- SERVICES GRID ---- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.service-card {
    display: block;
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    color: var(--text);
    border: 1px solid transparent;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}
.service-icon { font-size: 2.2rem; margin-bottom: 16px; }
.service-card h3 { color: var(--primary); margin-bottom: 8px; font-size: 1.05rem; }
.service-card p { font-size: 0.9rem; color: var(--text-light); }

/* ---- TEAM ---- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    justify-items: center;
}
.team-member {
    text-align: center;
    padding: 24px 16px;
    border-radius: var(--radius);
    width: 100%;
    transition: all var(--transition);
}
.team-member:hover { background: var(--bg-alt); }
.team-member--mayor {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}
.team-member--mayor:hover { background: linear-gradient(135deg, var(--primary-light), var(--primary)); }
.member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-alt);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 auto 12px;
}
.team-member--mayor .member-avatar { background: rgba(255,255,255,0.2); color: white; }
.team-member h3 { font-size: 0.92rem; margin-bottom: 4px; }
.member-role { font-size: 0.8rem; color: var(--text-light); font-weight: 500; }
.team-member--mayor .member-role { color: var(--accent-light); }

/* ---- PAGE CONTENT ---- */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}
.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin: 0;
}
.page-content, .entry-content {
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.8;
}
.entry-content h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary);
    margin: 40px 0 16px;
    font-size: 1.6rem;
}
.entry-content h3 {
    color: var(--primary-dark);
    margin: 24px 0 12px;
    font-size: 1.2rem;
}
.entry-content ul, .entry-content ol {
    margin: 12px 0;
    padding-left: 24px;
}
.entry-content li { margin-bottom: 8px; }
.entry-content p { margin-bottom: 16px; }

/* FILE DOWNLOADS */
.wp-block-file {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    margin: 12px 0;
    border-left: 4px solid var(--primary-light);
}
.wp-block-file a { font-weight: 500; }

/* ---- NEWSLETTER SECTION ---- */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-align: center;
    padding: 60px 0;
}
.newsletter-section h2 { color: white; }
.newsletter-section h2::after { background: rgba(255,255,255,0.5); }
.newsletter-section p { opacity: 0.9; margin-bottom: 24px; }
.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 250px;
    padding: 12px 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.95rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,0.6); }

/* ---- FOOTER ---- */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}
.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: white;
}
.footer-col h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent);
    margin-top: 8px;
}
.footer-col p, .footer-col li { font-size: 0.88rem; opacity: 0.8; margin-bottom: 6px; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col a { color: var(--text-white); opacity: 0.8; }
.footer-col a:hover { opacity: 1; color: var(--accent-light); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.6;
}

/* ---- SIDEBAR ---- */
.sidebar {
    padding: 20px;
}
.widget {
    margin-bottom: 32px;
    padding: 24px;
    background: var(--bg-alt);
    border-radius: var(--radius);
}
.widget h3, .widget-title {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 16px;
}
.widget ul { list-style: none; padding: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.widget li:last-child { border: none; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .hero-section { padding: 60px 0 80px; }
    .hero-section h1 { font-size: 2rem; }
    .section { padding: 50px 0; }
    .section-title { font-size: 1.6rem; }
    .news-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .top-bar .container { font-size: 0.75rem; gap: 12px; }
}
