/* ===========================
   SAES PORTAL — Design Townly
   =========================== */

:root {
    --primary: #1a3a6b;
    --primary-dark: #0f2347;
    --primary-light: #2a5298;
    --accent: #e8a020;
    --accent-dark: #c8861a;
    --green: #1e8449;
    --green-light: #27ae60;
    --white: #ffffff;
    --light: #f4f7fb;
    --light2: #eef2f8;
    --gray: #6c757d;
    --gray-light: #dee2e6;
    --dark: #1a1a2e;
    --text: #333344;
    --text-light: #6b7280;
    --radius: 6px;
    --radius-lg: 12px;
    --shadow: 0 2px 12px rgba(26,58,107,.10);
    --shadow-md: 0 4px 24px rgba(26,58,107,.15);
    --shadow-lg: 0 8px 40px rgba(26,58,107,.18);
    --transition: all .25s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--white);
    line-height: 1.65;
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.25;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======= HERO TOWNLY ======= */
.hero-townly {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Slideshow backgrounds */
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }

/* Gradient overlay — dark left, lighter right like Townly */
.hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(
        105deg,
        rgba(10,23,50,.88) 0%,
        rgba(15,35,71,.78) 45%,
        rgba(10,23,50,.55) 100%
    );
}

/* Slide dots */
.hero-dots {
    position: absolute;
    bottom: 110px;
    right: 40px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hero-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.5);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}
.hero-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.25);
}

/* Inner content */
.hero-townly-inner {
    position: relative; z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px 40px;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.htl-top { margin-bottom: 20px; }
.htl-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(232,160,32,.18);
    border: 1px solid rgba(232,160,32,.45);
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    padding: 7px 18px;
    border-radius: 30px;
}

.htl-title {
    font-size: clamp(2.2rem, 5.5vw, 3.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.12;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.htl-title span { color: var(--accent); }

.htl-subtitle {
    font-size: clamp(15px, 2vw, 17px);
    color: rgba(255,255,255,.82);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

/* Search box */
.htl-search-box {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

/* Tabs row */
.htl-tabs {
    display: flex;
    background: var(--primary-dark);
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}
.htl-tab {
    flex: 1;
    padding: 13px 16px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,.6);
    font-family: 'Montserrat', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .3px;
    cursor: pointer;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 7px;
    border-bottom: 3px solid transparent;
}
.htl-tab:hover { color: rgba(255,255,255,.9); background: rgba(255,255,255,.06); }
.htl-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(232,160,32,.1);
}

/* Search inputs row */
.htl-search-inner {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 14px 16px;
    background: white;
}
.htl-field {
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px;
    border-right: 1px solid #e8ecf0;
    flex: 1;
}
.htl-field:last-of-type { border-right: none; }
.htl-field i { color: var(--accent); font-size: 15px; flex-shrink: 0; }
.htl-field input,
.htl-field select {
    border: none;
    outline: none;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: var(--text);
    width: 100%;
    background: transparent;
    cursor: pointer;
}
.htl-field input::placeholder { color: #aab; }
.htl-field-main { flex: 1.8; }

.htl-search-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 13px 26px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
    margin-left: 10px;
}
.htl-search-btn:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(232,160,32,.45); }

/* Popular tags */
.htl-tags {
    padding: 10px 20px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #f8fafc;
    border-top: 1px solid #eef2f8;
}
.htl-tags span { font-size: 12px; color: var(--gray); font-weight: 600; }
.htl-tags a {
    font-size: 12px;
    color: var(--primary);
    background: #eef2ff;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    transition: var(--transition);
}
.htl-tags a:hover { background: var(--primary); color: white; }
.htl-field.hidden { display: none; }

/* Quick-access bar (bottom of hero — exactly like Townly) */
.htl-quickbar {
    position: relative; z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,.3);
    box-shadow: 0 -4px 30px rgba(0,0,0,.18);
}
.htl-qitem {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    color: var(--text) !important;
    border-right: 1px solid #e8ecf0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.htl-qitem::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    opacity: 0;
    transition: opacity .25s ease;
}
.htl-qitem:hover::before { opacity: 1; }
.htl-qitem:hover,
.htl-qitem:hover .htl-qtext strong,
.htl-qitem:hover .htl-qtext span,
.htl-qitem:hover .htl-qarrow { color: white !important; }
.htl-qitem:last-child { border-right: none; }

.htl-qicon {
    width: 46px; height: 46px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    position: relative; z-index: 1;
    transition: var(--transition);
}
.htl-qitem:hover .htl-qicon { background: rgba(255,255,255,.2); }

.htl-qtext { flex: 1; min-width: 0; position: relative; z-index: 1; }
.htl-qtext strong { display: block; font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htl-qtext span { display: block; font-size: 11.5px; color: var(--gray); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.htl-qarrow { color: var(--gray-light); font-size: 12px; flex-shrink: 0; position: relative; z-index: 1; transition: var(--transition); }
.htl-qitem:hover .htl-qarrow { transform: translateX(3px); }

/* ======= TOPBAR ======= */
.topbar {
    background: var(--primary-dark);
    color: rgba(255,255,255,.8);
    font-size: 12.5px;
    padding: 7px 0;
    border-bottom: 2px solid var(--accent);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.topbar-left { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar-left span { display: flex; align-items: center; gap: 6px; }
.topbar-left i { color: var(--accent); font-size: 11px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-right a { color: rgba(255,255,255,.75); font-size: 13px; }
.topbar-right a:hover { color: var(--accent); }
.topbar-btn {
    background: var(--accent);
    color: var(--white) !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px !important;
    display: flex; align-items: center; gap: 5px;
}
.topbar-btn:hover { background: var(--accent-dark) !important; }

/* ======= HEADER ======= */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    transition: var(--transition);
}
.main-header.scrolled {
    box-shadow: var(--shadow-md);
    top: -40px; /* hide topbar on scroll */
}
.header-spacer { height: 110px; }
.page-home .header-spacer { height: 0; }
/* Hero full-screen: header flotte au-dessus */
.page-home .main-header { background: rgba(10,23,50,.55); backdrop-filter: blur(6px); border-bottom: 1px solid rgba(255,255,255,.1); }
.page-home .main-header.scrolled { background: var(--white); }
.page-home .main-nav > a, .page-home .nav-dropdown > a { color: rgba(255,255,255,.88); }
.page-home .main-header.scrolled .main-nav > a,
.page-home .main-header.scrolled .nav-dropdown > a { color: var(--text); }
.page-home .logo-text strong { color: white; }
.page-home .logo-text small { color: rgba(255,255,255,.6); }
.page-home .main-header.scrolled .logo-text strong { color: var(--primary); }
.page-home .main-header.scrolled .logo-text small { color: var(--gray); }
.page-home .search-toggle { border-color: rgba(255,255,255,.3); color: white; }
.page-home .main-header.scrolled .search-toggle { border-color: var(--gray-light); color: var(--text); }
.page-home .hamburger span { background: white; }
.page-home .main-header.scrolled .hamburger span { background: var(--text); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary) !important;
    flex-shrink: 0;
}
.logo-icon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(26,58,107,.35);
}
.logo-text strong { display: block; font-family: 'Montserrat', sans-serif; font-size: 18px; font-weight: 800; color: var(--primary); letter-spacing: .5px; }
.logo-text small { display: block; font-size: 10px; color: var(--gray); font-weight: 500; letter-spacing: .3px; white-space: nowrap; }

/* NAV */
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav > a, .nav-dropdown > a {
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    padding: 8px 14px;
    border-radius: var(--radius);
    display: flex; align-items: center; gap: 5px;
    white-space: nowrap;
}
.main-nav > a:hover, .nav-dropdown > a:hover,
.main-nav > a.active, .nav-dropdown > a.active {
    color: var(--primary);
    background: var(--light);
}
.nav-dropdown { position: relative; }
.nav-dropdown > a i { font-size: 10px; transition: var(--transition); }
.nav-dropdown:hover > a i { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 210px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: var(--transition);
    border-top: 3px solid var(--accent);
    z-index: 100;
}
.nav-dropdown:hover .dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu a {
    display: block;
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text);
    border-radius: var(--radius);
    font-weight: 500;
}
.dropdown-menu a:hover { background: var(--light); color: var(--primary); padding-left: 20px; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.search-toggle {
    width: 38px; height: 38px;
    border: 1px solid var(--gray-light);
    background: none; cursor: pointer;
    border-radius: var(--radius);
    color: var(--text); font-size: 15px;
    transition: var(--transition);
}
.search-toggle:hover { background: var(--light); color: var(--primary); }

.btn-member {
    background: var(--accent);
    color: var(--white) !important;
    padding: 9px 20px;
    border-radius: 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .3px;
    box-shadow: 0 3px 12px rgba(232,160,32,.4);
}
.btn-member:hover { background: var(--accent-dark) !important; box-shadow: 0 5px 18px rgba(232,160,32,.5); }

.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 5px; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }

/* SEARCH BAR */
.search-bar {
    background: var(--light2);
    border-top: 1px solid var(--gray-light);
    padding: 12px 0;
    display: none;
}
.search-bar.open { display: block; }
.search-form { display: flex; gap: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.search-form input {
    flex: 1;
    border: none;
    padding: 12px 18px;
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    outline: none;
    background: white;
}
.search-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    display: flex; align-items: center; gap: 8px;
    transition: var(--transition);
}
.search-form button:hover { background: var(--primary-dark); }

/* btn-primary & btn-outline-white kept for other pages */
.btn-primary {
    background: var(--accent);
    color: white !important;
    padding: 14px 30px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(232,160,32,.5);
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: var(--accent-dark) !important; transform: translateY(-2px); }
.btn-outline-white {
    border: 2px solid rgba(255,255,255,.6);
    color: white !important;
    padding: 12px 28px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-white:hover { background: rgba(255,255,255,.12) !important; border-color: white; }

/* ======= SECTIONS ======= */
.section { padding: 70px 0; }
.section-alt { background: var(--light); }

.section-header { text-align: center; margin-bottom: 48px; }
.section-tag {
    display: inline-block;
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.section-header h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 14px; }
.section-header p { color: var(--text-light); max-width: 580px; margin: 0 auto; font-size: 15px; }
.section-divider {
    width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    margin: 16px auto 0;
}

/* ======= STATS BAR ======= */
.stats-bar {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 48px 0;
    position: relative;
    overflow: hidden;
}
.stats-bar::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.stat-item { text-align: center; }
.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--accent);
    display: block;
    line-height: 1;
    margin-bottom: 8px;
}
.stat-label { color: rgba(255,255,255,.8); font-size: 13px; font-weight: 500; letter-spacing: .5px; }
.stat-sep { width: 1px; height: 60px; background: rgba(255,255,255,.15); margin: 0 auto 24px; display: none; }

/* ======= NEWS CARDS ======= */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.news-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.news-card-img {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    overflow: hidden;
}
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.news-card:hover .news-card-img img { transform: scale(1.05); }
.news-card-img .news-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: rgba(255,255,255,.3); font-size: 48px;
}
.news-cat {
    position: absolute; top: 14px; left: 14px;
    font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    padding: 4px 10px; border-radius: 20px; color: white;
}
.cat-Declaration { background: var(--primary); }
.cat-Communique { background: var(--green); }
.cat-Activite { background: var(--accent); }
.cat-Societe { background: #8e44ad; }
.cat-Presse { background: #e74c3c; }

.news-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.news-date { font-size: 12px; color: var(--gray); display: flex; align-items: center; gap: 5px; }
.news-author { font-size: 12px; color: var(--gray); }
.news-card h3 { font-size: 15.5px; margin-bottom: 10px; color: var(--dark); line-height: 1.35; }
.news-card h3 a { color: var(--dark); }
.news-card h3 a:hover { color: var(--primary); }
.news-card p { font-size: 13.5px; color: var(--text-light); line-height: 1.6; margin-bottom: 16px; flex: 1; }
.news-card-footer { display: flex; justify-content: space-between; align-items: center; }
.read-more {
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    display: flex; align-items: center; gap: 5px;
    font-family: 'Montserrat', sans-serif;
}
.read-more:hover { color: var(--accent); gap: 8px; }

/* FEATURED NEWS (large card) */
.news-featured { grid-column: span 3; }
.news-featured .news-card-img { height: 300px; }
.news-featured .news-card-body { flex-direction: row; align-items: flex-start; gap: 20px; }
.news-featured .news-card-text { flex: 1; }
.news-featured h3 { font-size: 20px; }

/* ======= ABOUT SECTION ======= */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image { position: relative; }
.about-image img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.about-image-badge {
    position: absolute;
    bottom: -16px; right: -16px;
    background: var(--accent);
    color: white;
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
}
.about-image-badge strong { display: block; font-size: 2rem; font-family: 'Montserrat', sans-serif; font-weight: 800; }
.about-image-badge span { font-size: 12px; font-weight: 600; letter-spacing: .5px; }

.about-content { }
.about-content h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 16px; }
.about-content p { color: var(--text-light); margin-bottom: 16px; }
.about-values { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.value-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px;
    background: var(--light);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary);
}
.value-item i { color: var(--primary); font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.value-item h4 { font-size: 13.5px; margin-bottom: 3px; }
.value-item p { font-size: 12px; margin-bottom: 0; }

/* ======= EVENTS ======= */
.events-list { display: flex; flex-direction: column; gap: 16px; }
.event-item {
    display: flex; gap: 16px; align-items: flex-start;
    background: white;
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary);
}
.event-item:hover { transform: translateX(4px); box-shadow: var(--shadow-md); }
.event-date-box {
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    padding: 10px 14px;
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
}
.event-date-box .day { display: block; font-size: 22px; font-weight: 800; font-family: 'Montserrat', sans-serif; line-height: 1; }
.event-date-box .month { display: block; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin-top: 2px; }
.event-info h4 { font-size: 14.5px; margin-bottom: 6px; }
.event-info p { font-size: 13px; color: var(--text-light); }
.event-info .event-meta { display: flex; gap: 14px; margin-top: 6px; font-size: 12px; color: var(--gray); }
.event-info .event-meta i { color: var(--accent); }

/* ======= BUREAU / TEAM ======= */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.team-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-bottom-color: var(--primary); }
.team-avatar {
    width: 90px; height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    font-family: 'Montserrat', sans-serif;
    margin: 0 auto 14px;
    box-shadow: 0 4px 14px rgba(26,58,107,.25);
}
.team-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.team-card h4 { font-size: 14.5px; margin-bottom: 4px; }
.team-card .team-poste { font-size: 12.5px; color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.team-card .team-univ { font-size: 12px; color: var(--gray); }

/* ======= DOCUMENTS ======= */
.docs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.doc-item {
    display: flex; align-items: center; gap: 14px;
    background: white;
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.doc-item:hover { box-shadow: var(--shadow-md); transform: translateX(3px); }
.doc-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: var(--radius);
    background: var(--light2);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: var(--primary);
}
.doc-info { flex: 1; min-width: 0; }
.doc-info h4 { font-size: 13.5px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-info span { font-size: 11.5px; color: var(--gray); }
.doc-download {
    color: var(--accent);
    font-size: 16px;
    flex-shrink: 0;
    padding: 4px;
}
.doc-download:hover { color: var(--accent-dark); }

/* ======= NEWSLETTER ======= */
.newsletter-section {
    background: linear-gradient(135deg, var(--green) 0%, #145a32 100%);
    padding: 48px 0;
}
.newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}
.newsletter-text h3 { color: white; font-size: 1.5rem; margin-bottom: 6px; }
.newsletter-text p { color: rgba(255,255,255,.8); font-size: 14px; }
.newsletter-form { display: flex; gap: 0; border-radius: 30px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.2); flex: 1; max-width: 460px; }
.newsletter-form input { flex: 1; border: none; padding: 14px 20px; font-size: 14px; outline: none; }
.newsletter-form button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 14px 24px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    display: flex; align-items: center; gap: 7px;
    transition: var(--transition);
}
.newsletter-form button:hover { background: var(--accent-dark); }

/* ======= FOOTER ======= */
.site-footer { background: var(--dark); color: rgba(255,255,255,.75); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.5fr 1.5fr; gap: 40px; padding-bottom: 48px; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.footer-brand .logo-icon { background: rgba(255,255,255,.1); }
.footer-brand .logo-text strong { color: white; }
.footer-brand .logo-text small { color: rgba(255,255,255,.5); }
.footer-brand p { font-size: 13.5px; line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.7);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}
.footer-social a:hover { background: var(--accent); color: white; }

.footer-col h4 { color: white; font-size: 14px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a { color: rgba(255,255,255,.65); font-size: 13px; display: flex; align-items: center; gap: 7px; transition: var(--transition); }
.footer-col ul a i { color: var(--accent); font-size: 10px; }
.footer-col ul a:hover { color: white; padding-left: 4px; }

.footer-news { display: flex; flex-direction: column; gap: 14px; }
.footer-news-item { display: flex; flex-direction: column; gap: 3px; }
.fn-date { font-size: 11px; color: var(--accent); font-weight: 600; }
.fn-title { font-size: 13px; color: rgba(255,255,255,.65); line-height: 1.4; transition: var(--transition); }
.footer-news-item:hover .fn-title { color: white; }

.footer-contact { display: flex; flex-direction: column; gap: 10px; list-style: none !important; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: rgba(255,255,255,.65); }
.footer-contact i { color: var(--accent); margin-top: 2px; flex-shrink: 0; }

.footer-hours { margin-top: 18px; }
.footer-hours h5 { color: white; font-size: 12.5px; margin-bottom: 6px; }
.footer-hours p { font-size: 12.5px; color: rgba(255,255,255,.6); margin-bottom: 3px; }

.footer-bottom {
    background: rgba(0,0,0,.3);
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,.08);
}
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.footer-bottom p { font-size: 12.5px; color: rgba(255,255,255,.5); }
.footer-bottom a { color: var(--accent); }
.footer-bottom a:hover { color: white; }

/* ======= BREADCRUMB ======= */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 42px 0;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(circle at 70% 50%, rgba(232,160,32,.12) 0%, transparent 60%);
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero h1 { color: white; font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 10px; }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: rgba(255,255,255,.4); }
.breadcrumb .current { color: var(--accent); font-weight: 600; }

/* ======= PAGINATION ======= */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pagination a, .pagination span {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    font-family: 'Montserrat', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    border: 1px solid var(--gray-light);
    color: var(--text);
    transition: var(--transition);
}
.pagination a:hover { background: var(--primary); color: white; border-color: var(--primary); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }

/* ======= BUTTONS ======= */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 24px;
    border-radius: 24px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}
.btn-blue { background: var(--primary); color: white !important; }
.btn-blue:hover { background: var(--primary-dark) !important; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--accent); color: white !important; }
.btn-gold:hover { background: var(--accent-dark) !important; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary) !important; }
.btn-outline:hover { background: var(--primary); color: white !important; }

/* ======= SIDEBAR ======= */
.page-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 48px 0; }
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
    background: white;
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
}
.sidebar-widget h3 {
    font-size: 14.5px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    color: var(--primary);
}
.sidebar-links { display: flex; flex-direction: column; gap: 4px; }
.sidebar-links a {
    padding: 8px 10px;
    border-radius: var(--radius);
    font-size: 13.5px;
    color: var(--text);
    display: flex; align-items: center; justify-content: space-between;
}
.sidebar-links a:hover { background: var(--light); color: var(--primary); }
.sidebar-links a.active { background: var(--primary); color: white; }

/* ======= ALERTS ======= */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.alert-error { background: #f8d7da; color: #721c24; border-left: 4px solid #dc3545; }
.alert-info { background: #d1ecf1; color: #0c5460; border-left: 4px solid #17a2b8; }

/* ======= BACK TO TOP ======= */
.back-to-top {
    position: fixed; bottom: 30px; right: 30px; z-index: 999;
    width: 44px; height: 44px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    box-shadow: var(--shadow-md);
    opacity: 0; visibility: hidden;
    transition: var(--transition);
    cursor: pointer; border: none;
}
.back-to-top.show { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent); transform: translateY(-3px); }

/* ======= RESPONSIVE ======= */
@media (max-width: 1100px) {
    .news-grid { grid-template-columns: repeat(2, 1fr); }
    .news-featured { grid-column: span 2; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .team-grid { grid-template-columns: repeat(3, 1fr); }
    .about-grid { grid-template-columns: 1fr; }
    .about-image { display: none; }
}

@media (max-width: 900px) {
    .hero-quicklinks { grid-template-columns: repeat(2, 1fr); border-radius: var(--radius-lg); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .page-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

@media (max-width: 1100px) {
    .htl-quickbar { grid-template-columns: repeat(3, 1fr); }
    .htl-qitem:nth-child(4),
    .htl-qitem:nth-child(5) { border-top: 1px solid #e8ecf0; }
}
@media (max-width: 900px) {
    .htl-search-inner { flex-wrap: wrap; gap: 8px; }
    .htl-field-cat { display: none; }
    .htl-field { border-right: none; padding: 0 10px; }
    .htl-quickbar { grid-template-columns: repeat(2, 1fr); }
    .htl-dots { right: 16px; bottom: 90px; }
}
@media (max-width: 768px) {
    .hero-townly { min-height: auto; }
    .hero-townly-inner { padding: 80px 16px 30px; }
    .htl-title { font-size: clamp(1.6rem, 7vw, 2.4rem); }
    .htl-tabs { flex-wrap: wrap; }
    .htl-tab { padding: 10px 10px; font-size: 11.5px; }
    .htl-search-inner { padding: 12px; }
    .htl-search-btn { padding: 12px 18px; font-size: 13px; }
    .htl-quickbar { grid-template-columns: 1fr 1fr; }
    .htl-qitem { padding: 14px 12px; gap: 10px; }
    .htl-qtext strong { font-size: 12px; }
    .htl-qtext span { display: none; }
    .hero-dots { display: none; }
    .topbar-left { display: none; }
    .main-nav { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: white; flex-direction: column; align-items: flex-start; padding: 80px 24px 24px; z-index: 999; gap: 4px; overflow-y: auto; }
    .main-nav.open { display: flex; }
    .main-nav > a, .nav-dropdown > a { width: 100%; padding: 12px 16px; font-size: 15px; border-radius: var(--radius); }
    .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: none; border-left: 3px solid var(--primary); background: var(--light); margin: 4px 0 4px 16px; border-radius: var(--radius); }
    .hamburger { display: flex; z-index: 1001; }
    .hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
    .hamburger.open span:nth-child(2) { opacity: 0; }
    .hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }
    .header-spacer { height: 80px; }
    .hero { min-height: 400px; }
    .hero-quicklinks { grid-template-columns: repeat(2, 1fr); }
    .news-grid { grid-template-columns: 1fr; }
    .news-featured { grid-column: span 1; }
    .news-featured .news-card-body { flex-direction: column; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .docs-grid { grid-template-columns: 1fr; }
    .newsletter-inner { flex-direction: column; text-align: center; }
    .newsletter-form { max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
    .about-values { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-quicklinks { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .team-grid { grid-template-columns: 1fr 1fr; }
}
