/* ========================================
   ANOUANZE - SITE WEB COMPLET
   Couleurs du drapeau ivoirien
======================================== */

:root {
    --orange: #FF6B00;
    --white: #FFFFFF;
    --green: #009A44;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border: #dee2e6;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --radius: 12px;
}

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

html {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
    overflow-x: hidden;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

body > section, body > .section, body > main {
    flex: 1;
}

footer {
    margin-top: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ========== NAVIGATION ========== */
.navbar {
    background: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
}

.logo-text span {
    color: var(--orange);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--dark);
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--orange);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--orange);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Sous-menus dropdown */
.nav-item {
    position: relative;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item > a .dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.nav-item:hover > a .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    min-width: 180px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    padding: 10px 0;
    margin-top: 15px;
    z-index: 100;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--white);
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    margin-top: 10px;
}

.nav-dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.2s;
}

.nav-dropdown a:hover {
    background: var(--light);
    color: var(--orange);
    padding-left: 25px;
}

.nav-dropdown a::after {
    display: none;
}

.nav-auth {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-size: 1rem;
}

.btn-outline {
    border: 2px solid var(--orange);
    color: var(--orange);
    background: transparent;
}

.btn-outline:hover {
    background: var(--orange);
    color: var(--white);
}

.btn-primary {
    background: linear-gradient(135deg, var(--green), #00b84d);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0,154,68,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,107,0,0.4);
}

.btn-green {
    background: linear-gradient(135deg, var(--green), #00b84d);
    color: var(--white);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========== HERO ========== */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
    color: var(--white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, var(--orange), var(--green));
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
    opacity: 0.1;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-text h1 span {
    color: var(--orange);
}

.hero-text p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

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

.hero-image {
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 400px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.3));
}

/* Flag decoration */
.flag-decoration {
    display: flex;
    height: 5px;
    width: 100%;
}

.flag-decoration .orange { flex: 1; background: var(--orange); }
.flag-decoration .white { flex: 1; background: var(--white); }
.flag-decoration .green { flex: 1; background: var(--green); }

/* ========== SECTIONS ========== */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-header .underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--orange), var(--green));
    margin: 20px auto 0;
    border-radius: 2px;
}

/* ========== CARDS ========== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.card-content p {
    color: var(--gray);
    margin-bottom: 15px;
}

/* ========== VALUES ========== */
.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.mission-grid {
    grid-template-columns: repeat(3, 1fr);
}

.value-card {
    text-align: center;
    padding: 40px 25px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.value-card:hover {
    transform: translateY(-10px);
}

.value-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--green), #00b84d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.value-card h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.value-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* ========== NEWS CAROUSEL ========== */
.carousel-container {
    position: relative;
    overflow: hidden;
    padding: 0 50px;
}

.carousel-track {
    display: flex;
    gap: 25px;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: calc(33.333% - 17px);
    flex-shrink: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--orange);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: var(--green);
}

.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: var(--orange);
}

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

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

.event-date {
    background: linear-gradient(135deg, var(--green), #00b84d);
    color: var(--white);
    padding: 15px;
    text-align: center;
}

.event-date .day {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    font-size: 1rem;
    text-transform: uppercase;
}

.event-info {
    padding: 20px;
}

.event-info h3 {
    margin-bottom: 10px;
    color: var(--dark);
}

.event-info p {
    color: var(--gray);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.event-meta {
    display: flex;
    gap: 15px;
    color: var(--gray);
    font-size: 0.85rem;
}

/* ========== AUTH PAGES ========== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark), #16213e);
    padding: 40px 20px;
}

.auth-box {
    background: var(--white);
    padding: 50px 40px;
    border-radius: var(--radius);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 450px;
}

.auth-box .logo {
    justify-content: center;
    margin-bottom: 30px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--orange);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-checkbox input {
    width: auto;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--gray);
}

.form-footer a {
    color: var(--orange);
    font-weight: 500;
}

.error-message,
.success-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.error-message {
    background: #ffe6e6;
    color: #d63031;
    border: 1px solid #fab1a0;
}

.success-message {
    background: #e6ffe6;
    color: #00b894;
    border: 1px solid #55efc4;
}

.error-message.show,
.success-message.show {
    display: block;
}

/* ========== MEMBER DASHBOARD ========== */
.dashboard-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    padding: 30px 0;
}

.dashboard-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    height: fit-content;
}

.dashboard-sidebar .profile-mini {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), #00b84d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    margin: 0 auto 15px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 8px;
    color: var(--dark);
    transition: all 0.3s;
    margin-bottom: 5px;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: linear-gradient(135deg, var(--green), #00b84d);
    color: var(--white);
}

.dashboard-main {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--green), #00b84d);
    padding: 25px;
    border-radius: var(--radius);
    color: var(--white);
}

.stat-card h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-card p {
    opacity: 0.9;
}

/* ========== ADMIN PANEL ========== */
.admin-header {
    background: var(--dark);
    color: var(--white);
    padding: 15px 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav {
    display: flex;
    gap: 20px;
}

.admin-nav a {
    color: var(--white);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.admin-nav a:hover,
.admin-nav a.active {
    opacity: 1;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    background: var(--light);
    font-weight: 600;
}

.admin-table tr:hover {
    background: #f8f9fa;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-pending { background: #e2e3e5; color: #383d41; }

.action-btns {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.3s;
}

.action-btn:hover {
    opacity: 0.8;
}

.action-btn.edit { background: #3498db; color: white; }
.action-btn.delete { background: #e74c3c; color: white; }
.action-btn.validate { background: #27ae60; color: white; }

/* ========== ANNUAIRE ========== */
.annuaire-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.annuaire-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    text-align: center;
}

.annuaire-card .avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green), #00b84d);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
    margin: 0 auto 15px;
}

.annuaire-card h3 {
    margin-bottom: 5px;
}

.annuaire-card .profession {
    color: var(--orange);
    font-weight: 500;
    margin-bottom: 10px;
}

.annuaire-card .competences {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.competence-tag {
    background: var(--light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: var(--gray);
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--border);
    border-radius: 25px;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover,
.filter-btn.active {
    border-color: var(--orange);
    background: var(--orange);
    color: var(--white);
}

/* ========== CAPTCHA ========== */
.captcha-container {
    background: var(--light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.captcha-question {
    font-weight: 500;
    margin-bottom: 10px;
}

/* ========== FOOTER ========== */
footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 0 20px;
    width: 100%;
}

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

.footer-brand .logo-text {
    color: var(--white);
}

.footer-brand p {
    opacity: 0.8;
    margin: 15px 0;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--orange);
}

/* Boutons de partage social compact */
.social-share {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.social-share-btn svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.social-share-btn.facebook {
    background: #1877f2;
}

.social-share-btn.twitter {
    background: #000;
}

.social-share-btn.whatsapp {
    background: #25d366;
}

.social-share-btn.copy {
    background: #6c757d;
}

.social-share-btn.like {
    background: #f0f0f0;
    color: #333;
}

.social-share-btn.like svg {
    fill: #e74c3c;
}

.social-share-btn.like.liked {
    background: #e74c3c;
}

.social-share-btn.like.liked svg {
    fill: white;
}

.social-share-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.like-count {
    font-size: 0.85rem;
    color: #666;
    margin-left: 5px;
}

.footer-links h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links a {
    display: block;
    opacity: 0.8;
    margin-bottom: 10px;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--orange);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-flag {
    display: flex;
    width: 60px;
    height: 20px;
    border-radius: 3px;
    overflow: hidden;
}

.footer-flag span {
    flex: 1;
}

.footer-flag .orange { background: var(--orange); }
.footer-flag .white { background: var(--white); }
.footer-flag .green { background: var(--green); }

/* ========== PAGE HERO ========== */
.page-hero {
    background: linear-gradient(135deg, var(--dark), #16213e);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-hero p {
    opacity: 0.8;
}

/* ========== ARTICLES/BLOG ========== */
.articles-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

.articles-list {
    display: grid;
    gap: 30px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    grid-template-columns: 250px 1fr;
}

.article-card .card-image {
    height: 100%;
}

.article-card .card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.article-meta {
    display: flex;
    gap: 15px;
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.article-category {
    background: var(--orange);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

/* ========== SIDEBAR PUBLIQUE FLOTTANTE ========== */
.page-sidebar {
    position: fixed;
    top: 320px;
    right: 20px;
    width: 330px;
    max-height: calc(100vh - 340px);
    overflow-y: auto;
    z-index: 50;
}

/* Adapter le contenu quand le sidebar est présent sur grands écrans */
@media (min-width: 1401px) {
    /* Conteneurs des sections : élargir et aligner à gauche pour ne pas chevaucher le sidebar */
    body:has(.page-sidebar) .section > .container,
    body:has(.page-sidebar) footer .container {
        max-width: min(calc(100vw - 430px), 1400px);
        margin-left: 20px;
        margin-right: auto;
    }
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-widget h4 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--orange);
    font-size: 1.15rem;
}

/* Boutons toggle/fermer sidebar (défaut: cachés) */
.sidebar-toggle-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--orange);
    color: white;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 51;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.page-sidebar.sidebar-open .sidebar-close-btn {
    display: block;
}

/* Masquer sidebar flottante sur écrans < 1400px, afficher le bouton toggle */
@media (max-width: 1400px) {
    .page-sidebar {
        display: none;
    }
    .sidebar-toggle-btn {
        display: flex;
    }
    .page-sidebar.sidebar-open {
        display: block;
        position: fixed;
        right: 0;
        top: 0;
        width: 330px;
        height: 100vh;
        max-height: 100vh;
        background: var(--light);
        padding: 20px;
        padding-top: 70px;
        border-left: 1px solid var(--border);
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        z-index: 100;
    }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    /* Grille À la une : 1 colonne sur mobile */
    #homeSlideshow {
        grid-template-columns: 1fr !important;
    }

    /* Permettre au menu mobile de déborder */
    .navbar {
        overflow: visible !important;
    }
    .navbar .container {
        position: relative;
        overflow: visible !important;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        padding-bottom: 10px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-auth {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 0 20px 20px 20px;
        flex-direction: column;
        gap: 10px;
        z-index: 999;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border-top: 1px solid var(--light);
    }

    .nav-auth.active {
        display: flex;
    }

    .nav-auth .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 40px 20px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-image {
        display: none;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .values-grid,
    .mission-grid,
    .events-grid,
    .annuaire-grid {
        grid-template-columns: 1fr;
    }
    
    /* Galerie photos responsive */
    .section > .container > div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Fix carousel for mobile - force single item */
    .carousel-slide {
        min-width: 100% !important;
        flex-shrink: 0;
    }

    .carousel-container {
        padding: 0 40px;
        max-width: 100%;
        overflow: hidden;
    }

    .carousel-track {
        max-width: 100%;
    }

    .carousel-wrapper {
        max-width: 100%;
        overflow: hidden;
    }

    /* Fix overflow on all sections (except navbar for mobile menu) */
    .section,
    main,
    body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Container overflow - mais pas dans la navbar */
    .section .container,
    main .container,
    footer .container {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Fix inline grid styles */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Hero slider mobile */
    .hero,
    .hero-slideshow {
        overflow: hidden;
        max-width: 100vw;
    }

    .hero .container,
    .hero-slideshow .container {
        max-width: 100%;
        padding: 40px 15px !important;
    }

    .hero-slide {
        min-width: 100% !important;
    }

    .hero-slideshow h1,
    .hero-slide h1 {
        font-size: 1.8rem !important;
    }

    .hero-slideshow p {
        font-size: 1rem !important;
    }

    /* Hero nav buttons smaller on mobile */
    .hero-nav-btn {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }

    button.hero-nav-btn.prev,
    .hero-nav-btn.prev {
        left: 10px !important;
    }

    button.hero-nav-btn.next,
    .hero-nav-btn.next {
        right: 10px !important;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer responsive */
    footer .container > div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 30px !important;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Dashboard responsive */
    .dashboard-container {
        display: block !important;
        padding: 10px;
    }

    .dashboard-sidebar {
        display: block !important;
        position: relative;
        margin-bottom: 15px;
        padding: 10px;
        background: white;
        border-radius: 10px;
    }

    .dashboard-sidebar .profile-mini {
        display: none !important;
    }

    .dashboard-sidebar .sidebar-menu {
        display: flex !important;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }

    .dashboard-sidebar .sidebar-menu a {
        padding: 8px 10px;
        font-size: 0.75rem;
        margin-bottom: 0;
        background: #f0f2f5;
        border-radius: 8px;
        color: #333;
    }

    .dashboard-sidebar .sidebar-menu a.active,
    .dashboard-sidebar .sidebar-menu a:hover {
        background: linear-gradient(135deg, #009A44, #00b84d);
        color: white;
    }

    .dashboard-main {
        padding: 15px;
    }

    .dashboard-cards {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px;
    }

    .dashboard-cards .stat-card {
        padding: 15px;
        width: 100%;
    }

    .dashboard-cards .stat-card h3 {
        font-size: 1.4rem;
    }

    .dashboard-cards .stat-card p {
        font-size: 0.8rem;
    }
    
    .articles-container {
        grid-template-columns: 1fr;
    }
    
    .article-card {
        grid-template-columns: 1fr;
    }
    
    .article-card .card-image {
        height: 200px;
    }
    
    /* Auth pages responsive */
    .auth-box {
        margin: 20px;
        padding: 30px 20px;
    }
    
    /* Contact page responsive */
    .section > .container > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Event cards responsive */
    .event-card {
        flex-direction: column;
        text-align: center;
    }
    
    .event-date {
        margin: 0 auto 15px;
    }
    
    /* Page hero responsive */
    .page-hero h1 {
        font-size: 2rem;
    }
    
    /* Tables responsive */
    .admin-table {
        display: block;
        overflow-x: auto;
    }
    
    /* Buttons responsive */
    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    /* Cards responsive */
    .card {
        margin-bottom: 20px;
    }
    
    /* Member card responsive */
    #memberCard {
        max-width: 100% !important;
        margin: 20px !important;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.6rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .value-card {
        padding: 20px;
    }

    .value-icon {
        font-size: 2rem;
    }

    /* Galerie photos très petit écran */
    .section > .container > div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard cards on very small screens */
    .dashboard-cards {
        grid-template-columns: 1fr !important;
    }

    .dashboard-sidebar .sidebar-menu {
        flex-direction: column;
    }

    .dashboard-sidebar .sidebar-menu a {
        width: 100%;
        justify-content: center;
    }

    /* Carousel buttons smaller */
    .carousel-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 1rem !important;
    }

    .carousel-container {
        padding: 0 30px !important;
    }

    /* Container padding */
    .container {
        padding: 0 15px;
    }
}

/* ========== FOOTER CUSTOM ========== */
.footer-grid-custom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 40px 0;
}

.footer-col {
    text-align: left;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.social-icons a svg {
    width: 18px;
    height: 18px;
    fill: white;
}

.social-icons a.facebook { background: #1877f2; }
.social-icons a.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-icons a.whatsapp { background: #25d366; }
.social-icons a.twitter { background: #000; }

.social-icons a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .footer-grid-custom {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .footer-col {
        text-align: center;
    }
    
    .social-icons {
        justify-content: center;
    }
}
