/* ===== VARIABLES ET RESET ===== */
:root {
    --color-primary: #2E8B57;
    --color-primary-dark: #1e6b3a;
    --color-primary-light: #3cb371;
    --color-secondary: #FFD700;
    --color-warning: #FFA500;
    --color-danger: #DC3545;
    --color-success: #28A745;
    --color-gray-100: #f8f9fa;
    --color-gray-800: #343a40;
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius-lg: 10px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== BANDEAU D'ÉTAT DU PROJET ===== */
.project-status {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    text-align: center;
    font-size: 0.9rem;
    position: relative;
}

.project-status .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.status-badge {
    background: var(--color-secondary);
    color: #333;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.8rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* ===== HEADER PROFESSIONNEL ===== */
.main-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 1.2rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-icon {
    background: var(--color-secondary);
    color: var(--color-primary);
    width: 45px;
    height: 45px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.logo-text p {
    font-size: 0.8rem;
    opacity: 0.9;
    color: var(--color-secondary);
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
                url('https://images.unsplash.com/photo-1516589178581-6cd7833ae3b2?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: white;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.feature {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    min-width: 200px;
}

.feature i {
    font-size: 2rem;
    color: var(--color-secondary);
    margin-bottom: 10px;
}

/* ===== CARTE AMÉLIORÉE ===== */
.map-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    margin: 40px 0;
    box-shadow: var(--shadow-md);
}

.section-title {
    color: var(--color-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

#map {
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.map-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

/* ===== FORMULAIRE PROFESSIONNEL ===== */
.add-location-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    margin: 40px 0;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-primary);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.2);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* ===== STATUTS DES ADRESSES ===== */
.location-status {
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--color-warning);
}

.status-verified {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--color-success);
}

.status-reported {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--color-danger);
}

/* ===== LISTE AVEC FILTRES ===== */
.locations-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    margin: 40px 0;
    box-shadow: var(--shadow-md);
}

.filters-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--color-gray-100);
    border: 2px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.filter-btn:hover:not(.active) {
    border-color: var(--color-primary);
}

.location-card {
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--transition);
}

.location-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.location-title {
    color: var(--color-primary);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.location-actions {
    display: flex;
    gap: 10px;
}

.vote-btn, .report-btn {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.vote-btn {
    background: #e7f5ff;
    color: var(--color-primary);
}

.vote-btn.voted {
    background: var(--color-primary);
    color: white;
}

.report-btn {
    background: #fff5f5;
    color: var(--color-danger);
}

.vote-btn:hover {
    background: #d0ebff;
}

.report-btn:hover {
    background: #ffe3e3;
}

/* ===== FOOTER COMPLET ===== */
.main-footer {
    background: var(--color-gray-800);
    color: white;
    padding: 60px 0 30px;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: var(--color-secondary);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.legal-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #333;
}

/* ===== BOUTONS ===== */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 139, 87, 0.3);
}

.btn-secondary {
    background: var(--color-secondary);
    color: #333;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
    }

    .feature {
        width: 100%;
    }

    .map-controls, .filters-bar {
        flex-direction: column;
    }

    .location-header {
        flex-direction: column;
        gap: 10px;
    }

    .location-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* ===== LOADING STATES ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: var(--radius-lg);
}

.loading-overlay.active {
    display: flex;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.badge-verified {
    background: var(--color-success);
    color: white;
}

.badge-pending {
    background: var(--color-warning);
    color: #333;
}

.badge-reported {
    background: var(--color-danger);
    color: white;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-info {
    background: #e7f5ff;
    color: #004085;
    border-left: 4px solid #004085;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--color-success);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--color-warning);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--color-danger);
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    min-width: 300px;
    max-width: 400px;
    z-index: 9999;
    transform: translateX(400px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #007bff;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-content i {
    font-size: 1.2rem;
}

.notification-success {
    border-left-color: var(--color-success);
    background: linear-gradient(to right, #d4edda, #f8fff9);
}

.notification-success i {
    color: var(--color-success);
}

.notification-error {
    border-left-color: var(--color-danger);
    background: linear-gradient(to right, #f8d7da, #fff5f7);
}

.notification-error i {
    color: var(--color-danger);
}

.notification-info {
    border-left-color: #17a2b8;
    background: linear-gradient(to right, #d1ecf1, #f8feff);
}

.notification-info i {
    color: #17a2b8;
}

.notification-warning {
    border-left-color: var(--color-warning);
    background: linear-gradient(to right, #fff3cd, #fffdf5);
}

.notification-warning i {
    color: var(--color-warning);
}

.notification-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    border-radius: 4px;
    transition: background 0.2s;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Responsive notifications */
@media (max-width: 768px) {
    .notification {
        left: 20px;
        right: 20px;
        min-width: auto;
        max-width: none;
        top: 10px;
    }
}

/* ===== MESSAGE AUCUN RÉSULTAT ===== */
.no-results {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 20px;
}

.no-results h3 {
    color: var(--color-primary);
    margin-bottom: 10px;
}

.no-results p {
    color: #666;
    font-size: 1rem;
}

/* ===== PAGINATION ===== */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 16px;
    border: 2px solid var(--color-primary);
    background: white;
    color: var(--color-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
}

.pagination-btn.active {
    background: var(--color-primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

/* ===== CLUSTER MARKERS ===== */
.cluster-marker {
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
}

.cluster-small { width: 30px; height: 30px; }
.cluster-medium { width: 40px; height: 40px; font-size: 14px; }
.cluster-large { width: 50px; height: 50px; font-size: 16px; background: var(--color-primary-dark); }

/* ===== OFFLINE INDICATOR ===== */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--color-warning);
    color: #333;
    padding: 8px;
    text-align: center;
    font-size: 0.9rem;
    z-index: 9999;
    display: none;
}

.offline-indicator.show {
    display: block;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 150px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.will-change-transform {
    will-change: transform;
}

.reduce-motion * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}

/* ===== CUSTOM MARKERS ===== */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

.marker-popup {
    min-width: 200px;
}

.marker-popup h4 {
    margin: 0 0 5px 0;
    color: #2E8B57;
    font-size: 1.1rem;
}

.marker-popup p {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #666;
}

.marker-popup button {
    background: #2E8B57;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    width: 100%;
    margin-top: 5px;
}

.marker-popup button:hover {
    background: #1e6b3a;
}

/* ===== ADMIN SECTION ===== */
.admin-controls {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-card i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--color-secondary);
}

.stat-card h3 {
    font-size: 2rem;
    margin: 10px 0;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-warning {
    background: #ffc107;
    color: #333;
    border: none;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
}
/* AJOUTER à ton CSS (Sites-Ramadan-3.css) : */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    padding: 20px;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 8px 16px;
    border: 2px solid var(--color-primary);
    background: white;
    color: var(--color-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: white;
}

.pagination-btn.active {
    background: var(--color-primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}