/*
Theme Name: OFFISA New Theme
Theme URI: https://offisalyon1.fr/
Author: OFFISA Lyon 1
Author URI: https://offisalyon1.fr/
Description: Thème WordPress moderne pour l'OFFISA des Sports de Lyon 1er. Carte dynamique, agenda d'événements, design sportif et inclusif.
Version: 1.0.1
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: offisa-new-theme
Tags: sports, events, map, agenda, custom-colors, custom-logo, featured-images

OFFISA New Theme – Sport pour tous, Lyon 1er
*/

/* ========================================================================
   CSS VARIABLES / DESIGN TOKENS
   ======================================================================== */
:root {
    /* Couleurs OFFISA – basées sur le logo vert/blanc */
    --offisa-primary: #8DC63F;
    --offisa-primary-light: #A5D862;
    --offisa-primary-dark: #6EA030;
    --offisa-secondary: #2C3E50;
    --offisa-secondary-light: #3D5568;
    --offisa-accent: #F5A623;
    --offisa-accent-light: #FFD166;
    --offisa-success: #27AE60;
    --offisa-white: #FFFFFF;
    --offisa-light: #F5F8F0;
    --offisa-gray: #6C757D;
    --offisa-gray-light: #E9ECEF;
    --offisa-dark: #1D1D1D;
    --offisa-text: #333333;
    --offisa-text-light: #666666;

    /* Typographie */
    --font-heading: "Montserrat", "Segoe UI", sans-serif;
    --font-body: "Open Sans", "Segoe UI", sans-serif;

    /* Espacements */
    --section-padding: 80px 0;
    --container-width: 1200px;
    --border-radius: 12px;
    --border-radius-sm: 8px;

    /* Ombres */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================================================
   RESET & BASE
   ======================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--offisa-text);
    line-height: 1.7;
    background: var(--offisa-white);
    overflow-x: hidden;
}

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

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

a:hover {
    color: var(--offisa-secondary);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--offisa-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }

ul { list-style: none; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================================================
   HEADER / NAVIGATION
   ======================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--offisa-primary);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

body.admin-bar .site-header { top: 32px; }

@media screen and (max-width: 782px) {
    body.admin-bar .site-header { top: 46px; }
}

.site-header.scrolled {
    background: var(--offisa-primary-dark);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ── Header inner : logo + nav sur une seule ligne ── */
.header-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0 32px;
    max-width: 100%;
    margin: 0 auto;
    height: 64px;
    overflow: visible;
}

/* ── Logo ── */
.site-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-right: 32px;
}

.site-logo img {
    height: 42px;
    width: auto;
    display: block;
}

.site-logo .logo-text {
    color: var(--offisa-white);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* ── Navigation principale ── */
.main-nav {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    overflow: visible;
}

/* Liste top-level : une rangée horizontale */
.main-nav > ul,
.main-nav ul.menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 0;
    height: 100%;
}

/* Chaque item top-level */
.main-nav > ul > li,
.main-nav ul.menu > li {
    position: relative;
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

/* Lien top-level */
.main-nav > ul > li > a,
.main-nav ul.menu > li > a {
    display: flex;
    align-items: center;
    color: var(--offisa-white);
    padding: 0 14px;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: background 0.2s ease, border-color 0.2s ease;
    line-height: 1;
    height: 100%;
    box-sizing: border-box;
}

.main-nav > ul > li > a:hover,
.main-nav ul.menu > li:hover > a,
.main-nav ul.menu > li.current-menu-item > a,
.main-nav ul.menu > li.current-menu-parent > a {
    background: rgba(0,0,0,0.12);
    border-bottom-color: var(--offisa-white);
    color: var(--offisa-white);
}

/* Indicateur dropdown ▾ */
.main-nav .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255,255,255,0.8);
    margin-left: 6px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ── Sous-menus (dropdowns) ── */
.main-nav .sub-menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    min-width: 240px;
    background: var(--offisa-secondary);
    border-top: 3px solid var(--offisa-primary);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 9999;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    flex-direction: column !important;
    border-radius: 0 0 6px 6px;
}

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu {
    display: flex !important;
}

.main-nav .sub-menu > li {
    display: block;
    width: 100%;
    flex-shrink: 1;
}

.main-nav .sub-menu > li > a {
    display: block;
    color: var(--offisa-white);
    padding: 10px 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    border-bottom: none;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
    line-height: 1.4;
    height: auto;
}

.main-nav .sub-menu > li > a:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: var(--offisa-primary);
    color: var(--offisa-white);
}

/* Séparateur visuel entre items du sous-menu */
.main-nav .sub-menu > li + li {
    border-top: 1px solid rgba(255,255,255,0.07);
}

/* ── Bouton CTA "Contact" ── */
.nav-cta > a,
.main-nav ul.menu > li.nav-cta > a {
    background: var(--offisa-white) !important;
    color: var(--offisa-primary-dark) !important;
    border-radius: 4px !important;
    margin: auto 0 auto 8px;
    padding: 8px 18px !important;
    height: auto !important;
    border-bottom: none !important;
    font-size: 0.76rem;
}

.nav-cta > a:hover,
.main-nav ul.menu > li.nav-cta > a:hover {
    background: var(--offisa-primary-dark) !important;
    color: var(--offisa-white) !important;
    border-bottom: none !important;
}

/* ── Bouton hamburger (mobile) ── */
.menu-toggle {
    display: none;
    background: none;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 4px;
    cursor: pointer;
    padding: 6px 8px;
    align-self: center;
    margin-left: 16px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--offisa-white);
    margin: 4px 0;
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================================================
   HERO SECTION
   ======================================================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--offisa-primary-dark) 0%, var(--offisa-primary) 50%, var(--offisa-primary-light) 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("assets/img/hero-pattern.svg") repeat;
    opacity: 0.05;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    color: var(--offisa-white);
    padding: 40px 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(141, 198, 63, 0.9);
    color: var(--offisa-white);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 3.8rem);
    font-weight: 800;
    color: var(--offisa-white);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-title span {
    color: var(--offisa-accent);
}

.hero-subtitle {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 40px;
    margin-top: 60px;
}

.hero-stat {
    text-align: center;
    color: var(--offisa-white);
}

.hero-stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--offisa-accent);
}

.hero-stat-label {
    font-size: 0.85rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Floating shapes */
.hero-shapes {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.hero-shapes .shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: var(--offisa-white);
}

.hero-shapes .shape-1 {
    width: 400px; height: 400px;
    top: -100px; right: -100px;
}

.hero-shapes .shape-2 {
    width: 250px; height: 250px;
    bottom: 10%; right: 20%;
}

.hero-shapes .shape-3 {
    width: 150px; height: 150px;
    bottom: 30%; left: -50px;
}

/* ========================================================================
   BUTTONS
   ======================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--offisa-secondary);
    color: var(--offisa-white);
}

.btn-primary:hover {
    background: var(--offisa-secondary-light);
    color: var(--offisa-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--offisa-white);
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: var(--offisa-white);
    color: var(--offisa-primary);
    border-color: var(--offisa-white);
    transform: translateY(-3px);
}

.btn-dark {
    background: var(--offisa-primary);
    color: var(--offisa-white);
}

.btn-dark:hover {
    background: var(--offisa-primary-dark);
    color: var(--offisa-white);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(110, 160, 48, 0.4);
}

/* ========================================================================
   SECTION TITLES
   ======================================================================== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(141, 198, 63, 0.12);
    color: var(--offisa-primary-dark);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.section-title {
    margin-bottom: 16px;
}

.section-title span {
    color: var(--offisa-secondary);
}

.section-description {
    color: var(--offisa-text-light);
    font-size: 1.05rem;
}

/* ========================================================================
   MAP SECTION - TROUVE TON SPORT (Carte + Contacts Acteurs)
   ======================================================================== */
.map-section {
    padding: var(--section-padding);
    background: var(--offisa-light);
}

.map-wrapper {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
    background: var(--offisa-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 600px;
}

.map-sidebar {
    background: var(--offisa-primary);
    color: var(--offisa-white);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.map-sidebar-header h3 {
    color: var(--offisa-white);
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.map-search {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--border-radius-sm);
    background: rgba(255,255,255,0.1);
    color: var(--offisa-white);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.map-search::placeholder {
    color: rgba(255,255,255,0.5);
}

.map-search:focus {
    border-color: var(--offisa-accent);
    background: rgba(255,255,255,0.15);
}

.map-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.map-filter-btn {
    padding: 5px 12px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    background: transparent;
    color: var(--offisa-white);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.map-filter-btn.active,
.map-filter-btn:hover {
    background: var(--offisa-secondary);
    border-color: var(--offisa-secondary);
}

.map-locations-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

/* Items dans la sidebar - contacts acteurs */
.map-location-item {
    padding: 14px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.map-location-item:hover,
.map-location-item.active {
    background: rgba(255,255,255,0.1);
}

.map-location-item h4 {
    color: var(--offisa-white);
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.map-location-item .location-type {
    display: inline-block;
    background: var(--offisa-accent);
    color: var(--offisa-dark);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 50px;
    font-weight: 600;
    margin-bottom: 4px;
}

.map-location-item .location-address {
    font-size: 0.8rem;
    opacity: 0.7;
}

.map-location-item .location-contact-info {
    font-size: 0.78rem;
    opacity: 0.8;
    margin-top: 4px;
}

.map-location-item .location-contact-info a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.map-location-item .location-contact-info a:hover {
    color: var(--offisa-white);
    text-decoration: underline;
}

/* Sports badges sous le nom d'une association */
.assoc-sports-badges {
    margin: 5px 0 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.map-container {
    position: relative;
}

#offisa-map {
    width: 100%;
    height: 100%;
    min-height: 600px;
}

/* No results dans la sidebar */
.map-no-results {
    padding: 30px 20px;
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Hint "Centrer sur la carte" au hover — supprimé, le clic sur l'item suffit */
.map-location-item.has-location {
    cursor: pointer;
}
.map-location-item.has-location.active {
    background: rgba(141,198,63,0.12);
    border-left-color: var(--offisa-accent) !important;
}

/* -------------------------------------------------------
   Leaflet — Labels permanents sur les marqueurs lieux
   ------------------------------------------------------- */
.offisa-map-label {
    background: #ffffff;
    border: 1.5px solid rgba(44,62,80,0.15);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    color: #2C3E50;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    white-space: nowrap;
    pointer-events: none;
}
.offisa-map-label.leaflet-tooltip-top::before {
    border-top-color: rgba(44,62,80,0.15);
}

/* Leaflet — Labels permanents sur les marqueurs associations */
.offisa-assoc-label {
    background: #7B2FBE;
    border: 1.5px solid rgba(123,47,190,0.4);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(123,47,190,0.35);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    white-space: nowrap;
    pointer-events: none;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.offisa-assoc-label.leaflet-tooltip-top::before {
    border-top-color: #7B2FBE;
}

/* ========================================================================
   AGENDA SECTION (style Mix Arts)
   ======================================================================== */
.agenda-section {
    padding: var(--section-padding);
    background: var(--offisa-white);
}

.agenda-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.agenda-view-toggle {
    display: flex;
    background: var(--offisa-gray-light);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.agenda-view-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    color: var(--offisa-text-light);
}

.agenda-view-btn.active {
    background: var(--offisa-primary);
    color: var(--offisa-white);
}

.agenda-month-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.agenda-month-nav button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--offisa-gray-light);
    border-radius: 50%;
    background: var(--offisa-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

.agenda-month-nav button:hover {
    background: var(--offisa-primary);
    color: var(--offisa-white);
    border-color: var(--offisa-primary);
}

.agenda-month-label {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 180px;
    text-align: center;
}

/* Calendar grid */
.agenda-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--offisa-gray-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.agenda-calendar-header {
    background: var(--offisa-primary);
    color: var(--offisa-white);
    padding: 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.agenda-calendar-day {
    background: var(--offisa-white);
    min-height: 100px;
    padding: 8px;
    transition: var(--transition);
}

.agenda-calendar-day:hover {
    background: var(--offisa-light);
}

.agenda-calendar-day.other-month {
    opacity: 0.4;
}

.agenda-calendar-day.today {
    background: rgba(141, 198, 63, 0.08);
    border: 2px solid var(--offisa-primary);
}

.calendar-day-number {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--offisa-dark);
    margin-bottom: 4px;
}

.calendar-event-dot {
    display: inline-block;
    width: 100%;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--offisa-white);
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-dot.cat-sport { background: var(--offisa-secondary); }
.calendar-event-dot.cat-culture { background: var(--offisa-success); }
.calendar-event-dot.cat-social { background: var(--offisa-accent); color: var(--offisa-dark); }
.calendar-event-dot.cat-default { background: var(--offisa-primary); }

/* List view */
.agenda-list {
    display: none;
}

.agenda-list.active {
    display: block;
}

.agenda-calendar-wrapper {
    display: none;
}

.agenda-calendar-wrapper.active {
    display: block;
}

.agenda-list-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    background: var(--offisa-white);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--offisa-primary);
}

.agenda-list-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.agenda-list-item.cat-sport { border-left-color: var(--offisa-secondary); }
.agenda-list-item.cat-culture { border-left-color: var(--offisa-success); }
.agenda-list-item.cat-social { border-left-color: var(--offisa-accent); }

.agenda-list-date {
    text-align: center;
    background: var(--offisa-light);
    border-radius: var(--border-radius-sm);
    padding: 10px;
}

.agenda-list-date .day {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--offisa-primary);
    line-height: 1;
    font-family: var(--font-heading);
}

.agenda-list-date .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--offisa-secondary);
    font-weight: 700;
    letter-spacing: 1px;
}

.agenda-list-info h4 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.agenda-list-info .event-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--offisa-text-light);
}

.agenda-list-info .event-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.agenda-list-action .btn {
    padding: 8px 20px;
    font-size: 0.8rem;
}

/* ========================================================================
   PROJECTS / ABOUT SECTION
   ======================================================================== */
.projects-section {
    padding: var(--section-padding);
    background: var(--offisa-light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.project-card {
    background: var(--offisa-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-card-image {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-card-image img {
    transform: scale(1.05);
}

.project-card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--offisa-secondary);
    color: var(--offisa-white);
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.project-card-body {
    padding: 24px;
}

.project-card-body h3 {
    margin-bottom: 10px;
    font-size: 1.15rem;
}

.project-card-body p {
    color: var(--offisa-text-light);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.project-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--offisa-primary);
    font-weight: 700;
    font-size: 0.9rem;
}

.project-card-link:hover {
    gap: 10px;
    color: var(--offisa-secondary);
}

/* ========================================================================
   PARTNERS
   ======================================================================== */
.partners-section {
    padding: 60px 0;
    background: var(--offisa-white);
    border-top: 1px solid var(--offisa-gray-light);
    border-bottom: 1px solid var(--offisa-gray-light);
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.partner-logo {
    max-height: 60px;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: var(--transition);
}

.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* ========================================================================
   CTA SECTION
   ======================================================================== */
.cta-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--offisa-primary) 0%, var(--offisa-primary-dark) 100%);
    color: var(--offisa-white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    top: -200px;
    right: -200px;
}

.cta-section h2 {
    color: var(--offisa-white);
    margin-bottom: 16px;
}

.cta-section p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

/* ========================================================================
   FOOTER
   ======================================================================== */
.site-footer {
    background: var(--offisa-primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo-text {
    color: var(--offisa-white);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    margin-bottom: 16px;
    display: block;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--offisa-white);
    transition: var(--transition);
    font-size: 1rem;
}

.footer-social a:hover {
    background: var(--offisa-secondary);
    border-color: var(--offisa-secondary);
    transform: translateY(-3px);
}

.footer-col h4 {
    color: var(--offisa-white);
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--offisa-white);
    padding-left: 4px;
}

.footer-contact-item {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.footer-contact-item .icon {
    color: var(--offisa-accent);
    min-width: 20px;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* ========================================================================
   SINGLE EVENT
   ======================================================================== */
.event-single-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--offisa-primary) 0%, var(--offisa-primary-light) 100%);
    color: var(--offisa-white);
}

.event-meta-bar {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.event-content {
    padding: 60px 0;
}

.event-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.event-sidebar-card {
    background: var(--offisa-light);
    border-radius: var(--border-radius);
    padding: 24px;
    margin-bottom: 20px;
}

/* ========================================================================
   PAGE TEMPLATES
   ======================================================================== */
.page-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--offisa-primary) 0%, var(--offisa-primary-light) 100%);
    color: var(--offisa-white);
    text-align: center;
}

.page-header h1 {
    color: var(--offisa-white);
}

.page-header .breadcrumbs {
    margin-top: 12px;
    opacity: 0.7;
    font-size: 0.9rem;
}

.page-content {
    padding: 60px 0;
}

/* ========================================================================
   SHARE BAR (articles)
   ======================================================================== */
.post-share-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(44,62,80,0.1);
}

.post-share-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--offisa-text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-right: 4px;
}

.post-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    color: #ffffff;
}

.post-share-btn:hover {
    opacity: 0.88;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    color: #ffffff;
}

.post-share-fb {
    background: #1877F2;
}

.post-share-ig {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

/* ========================================================================
   ARCHIVE EVENTS
   ======================================================================== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.event-card {
    background: var(--offisa-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}

.event-card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-card-date-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--offisa-secondary);
    color: var(--offisa-white);
    border-radius: var(--border-radius-sm);
    padding: 8px 14px;
    text-align: center;
}

.event-card-date-badge .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.event-card-date-badge .month {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.event-card-body {
    padding: 20px;
}

.event-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.event-card-body h3 a {
    color: var(--offisa-dark);
}

.event-card-body h3 a:hover {
    color: var(--offisa-secondary);
}

.event-card-meta {
    font-size: 0.85rem;
    color: var(--offisa-text-light);
    display: flex;
    gap: 16px;
}

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 992px) {
    .map-wrapper {
        grid-template-columns: 1fr;
        height: auto;
    }

    .map-sidebar {
        max-height: 250px;
    }

    #offisa-map {
        min-height: 400px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .event-content-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 24px;
    }
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--offisa-primary-dark);
        border-top: 3px solid var(--offisa-primary);
        box-shadow: 0 8px 20px rgba(0,0,0,0.2);
        z-index: 9998;
        padding: 0;
        flex: none;
    }

    .main-nav.active {
        display: block;
    }

    /* liste verticale en mobile */
    .main-nav > ul,
    .main-nav ul.menu {
        flex-direction: column !important;
        height: auto;
        align-items: stretch;
    }

    .main-nav > ul > li,
    .main-nav ul.menu > li {
        display: block;
        width: 100%;
        flex-shrink: 1;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .main-nav > ul > li > a,
    .main-nav ul.menu > li > a {
        height: auto;
        padding: 14px 20px;
        font-size: 0.85rem;
        border-bottom: none;
        white-space: normal;
    }

    .main-nav > ul > li > a:hover,
    .main-nav ul.menu > li:hover > a {
        border-bottom: none;
        background: rgba(0,0,0,0.15);
    }

    /* Sous-menus en mobile : toujours visibles, indentés */
    .main-nav .sub-menu {
        display: flex !important;
        position: static !important;
        box-shadow: none;
        border-top: none;
        border-radius: 0;
        border-left: 3px solid var(--offisa-primary);
        background: rgba(0,0,0,0.15);
        padding: 4px 0;
        margin: 0 0 0 20px;
        min-width: unset;
    }

    .main-nav .sub-menu > li > a {
        padding: 10px 20px;
        font-size: 0.8rem;
        border-left: none;
    }

    .main-nav .menu-item-has-children > a::after {
        display: none;
    }

    .nav-cta > a,
    .main-nav ul.menu > li.nav-cta > a {
        margin: 12px 20px;
        display: inline-block;
        width: auto;
        height: auto;
    }
}

@media (max-width: 768px) {
    .hero-content {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    /* Carte + sidebar responsive */
    .map-wrapper {
        grid-template-columns: 1fr;
        height: auto;
    }

    .map-sidebar {
        max-height: 300px;
    }

    #offisa-map {
        min-height: 350px;
    }

    .agenda-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .agenda-calendar {
        font-size: 0.8rem;
    }

    .agenda-calendar-day {
        min-height: 60px;
        padding: 4px;
    }

    .agenda-list-item {
        grid-template-columns: 60px 1fr;
    }

    .agenda-list-action {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 50px 0;
    }

    .hero-stat-number {
        font-size: 2rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}
