/* ================================================================
   ZAAG - Site institutionnel public
   ================================================================ */
@import url('main.css');

/* --- Topbar institutionnelle ----------------------------------- */
.top-bar {
    background: var(--primary-dark); color: rgba(255,255,255,.75);
    font-size: .8rem; padding: 6px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.top-bar a { color: rgba(255,255,255,.75); }
.top-bar a:hover { color: var(--white); }

/* --- Header principal ----------------------------------------- */
.site-header {
    background: var(--white); box-shadow: var(--shadow-sm);
    position: sticky; top: 0; z-index: 1000;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; gap: 24px; }
.site-logo { display: flex; align-items: center; gap: 14px; }
.site-logo img { height: 56px; width: auto; }
.site-logo .logo-text { line-height: 1.3; }
.site-logo .logo-text h1 { font-size: 1.05rem; font-weight: 800; color: var(--primary); }
.site-logo .logo-text small { font-size: .75rem; color: var(--gray-600); }

/* Nav principal */
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    padding: 8px 14px; border-radius: var(--radius); color: var(--dark);
    font-size: .88rem; font-weight: 500; transition: var(--transition);
}
.main-nav a:hover, .main-nav a.active { background: #eef2ff; color: var(--primary); }
.nav-cta { background: var(--primary) !important; color: var(--white) !important; padding: 8px 20px !important; }
.nav-cta:hover { background: var(--primary-dark) !important; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); }

/* --- Hero slider ---------------------------------------------- */
.hero {
    position: relative; overflow: hidden; height: 600px;
    background: var(--primary-dark);
}
.hero-slides { display: flex; height: 100%; transition: transform .6s cubic-bezier(.4,0,.2,1); }
.hero-slide {
    min-width: 100%; height: 100%; position: relative;
    background-size: cover; background-position: center;
}
.hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(26,60,110,.75) 0%, rgba(0,0,0,.3) 100%); }
.hero-content { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 80px; max-width: 700px; }
.hero-content .tag { background: var(--secondary); color: var(--white); padding: 6px 16px; border-radius: 20px; font-size: .8rem; font-weight: 700; margin-bottom: 16px; display: inline-block; }
.hero-content h2 { font-size: 2.8rem; font-weight: 900; color: var(--white); line-height: 1.2; margin-bottom: 16px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.hero-content p { font-size: 1.1rem; color: rgba(255,255,255,.9); margin-bottom: 28px; max-width: 520px; }
.hero-nav { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 2; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); cursor: pointer; transition: var(--transition); border: none; }
.hero-dot.active { background: var(--white); transform: scale(1.3); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(255,255,255,.2); border: none; width: 48px; height: 48px; border-radius: 50%; color: var(--white); font-size: 1.2rem; cursor: pointer; transition: var(--transition); }
.hero-arrow:hover { background: rgba(255,255,255,.4); }
.hero-prev { left: 24px; }
.hero-next { right: 24px; }

/* --- Bandeaux -------------------------------------------------- */
.band-stats { background: var(--primary); color: var(--white); padding: 40px 0; }
.band-stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.band-stats .stat-item .number { font-size: 2.5rem; font-weight: 900; color: var(--secondary); }
.band-stats .stat-item .desc { font-size: .85rem; opacity: .85; margin-top: 4px; }

/* --- Sections -------------------------------------------------- */
.section { padding: 80px 0; }
.section-alt { background: var(--white); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag { display: inline-block; background: #eef2ff; color: var(--primary); font-size: .8rem; font-weight: 700; padding: 5px 14px; border-radius: 20px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .08em; }
.section-header h2 { font-size: 2rem; font-weight: 800; color: var(--dark); margin-bottom: 12px; }
.section-header p { font-size: 1rem; color: var(--gray-600); max-width: 580px; margin: 0 auto; }
.divider { width: 60px; height: 4px; background: var(--secondary); border-radius: 2px; margin: 16px auto 0; }

/* --- Mot du maire --------------------------------------------- */
.maire-section .container { display: grid; grid-template-columns: 1fr 1.6fr; gap: 64px; align-items: center; }
.maire-img { position: relative; }
.maire-img img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; }
.maire-img .badge-overlay { position: absolute; bottom: -20px; right: -20px; background: var(--secondary); color: var(--white); padding: 16px 20px; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); font-weight: 700; text-align: center; font-size: .9rem; }
.maire-content blockquote { font-size: 1.1rem; font-style: italic; color: var(--primary); border-left: 4px solid var(--secondary); padding-left: 24px; margin: 24px 0; line-height: 1.8; }
.maire-sign { display: flex; align-items: center; gap: 16px; margin-top: 24px; }
.maire-sign .sign-text strong { display: block; color: var(--primary); font-size: 1rem; }
.maire-sign .sign-text span { font-size: .82rem; color: var(--gray-600); }

/* --- Services -------------------------------------------------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
    background: var(--white); border-radius: var(--radius-lg); padding: 32px 28px;
    box-shadow: var(--shadow-sm); transition: var(--transition); cursor: pointer;
    border: 2px solid transparent; text-align: center;
}
.service-card:hover { border-color: var(--primary); transform: translateY(-6px); box-shadow: var(--shadow-md); }
.service-icon { width: 72px; height: 72px; background: linear-gradient(135deg, #eef2ff, #dce8ff); border-radius: 20px; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 20px; }
.service-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.service-card p { font-size: .87rem; color: var(--gray-600); line-height: 1.7; }
.service-card .link { margin-top: 16px; font-size: .85rem; font-weight: 600; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }

/* --- Actualités ----------------------------------------------- */
.news-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.news-main { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.news-main img { width: 100%; height: 360px; object-fit: cover; }
.news-main .news-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 60%); display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; color: var(--white); }
.news-main .news-overlay .cat { background: var(--secondary); display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: .75rem; font-weight: 700; margin-bottom: 10px; }
.news-main .news-overlay h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; }
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-item { background: var(--white); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); display: flex; gap: 14px; align-items: flex-start; transition: var(--transition); }
.news-item:hover { box-shadow: var(--shadow-md); transform: translateX(4px); }
.news-item img { width: 80px; height: 70px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.news-item h4 { font-size: .88rem; font-weight: 600; color: var(--dark); line-height: 1.4; }
.news-item small { color: var(--gray-600); font-size: .78rem; }

/* --- Contact -------------------------------------------------- */
.contact-section .container { display: grid; grid-template-columns: 1fr 1.4fr; gap: 64px; }
.contact-info .info-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-info .info-icon { width: 44px; height: 44px; background: #eef2ff; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--primary); font-size: 1.1rem; flex-shrink: 0; }
.contact-form { background: var(--white); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-md); }

/* --- Footer --------------------------------------------------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.7); padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .logo-text h2 { color: var(--white); font-size: 1.1rem; }
.footer-brand p { font-size: .87rem; line-height: 1.7; margin-top: 14px; }
.footer-col h4 { color: var(--white); font-size: .9rem; font-weight: 700; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--secondary); display: inline-block; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,.65); font-size: .85rem; }
.footer-col ul li a:hover { color: var(--secondary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; text-align: center; font-size: .82rem; }
.social-links { display: flex; gap: 12px; margin-top: 20px; }
.social-links a { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.65); font-size: .9rem; transition: var(--transition); }
.social-links a:hover { background: var(--secondary); border-color: var(--secondary); color: var(--white); }

/* --- Responsive ----------------------------------------------- */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .band-stats .container { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .hero { height: 480px; }
    .hero-content { padding: 0 24px; }
    .hero-content h2 { font-size: 1.8rem; }
    .main-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 16px; box-shadow: var(--shadow-md); z-index: 999; }
    .main-nav.open { display: flex; }
    .nav-toggle { display: block; }
    .site-header .container { position: relative; flex-wrap: wrap; }
    .maire-section .container,
    .contact-section .container { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}
