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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    overflow-x: hidden;
}

/* Header optimisé pour mobile */
.header {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    border-bottom: 2px solid #00bcd4;
}

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

.logo-section img {
    height: 40px;
    width: auto;
}

.title-section {
    text-align: center;
    flex: 1;
}

.main-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #00bcd4;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin: 0;
}

.subtitle {
    font-size: 0.9em;
    opacity: 0.9;
    margin: 0;
}

.stats-section {
    background: rgba(0, 188, 212, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(0, 188, 212, 0.3);
}

.stats-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #00bcd4;
}

.stats-label {
    font-size: 0.8em;
    opacity: 0.8;
}

/* Container principal avec marge pour header */
.main-container {
    margin-top: 60px;
    display: flex;
    height: calc(100vh - 60px);
    position: relative;
}

/* Section carte optimisée */
.map-section {
    flex: 1;
    position: relative;
    background: #f0f0f0;
    overflow: hidden;
}

.map-container {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: crosshair;
    overflow: hidden;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

/* Contrôles de zoom améliorés */
.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 100;
}

.zoom-btn {
    width: 45px;
    height: 45px;
    background: rgba(0, 188, 212, 0.9);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.zoom-btn:hover {
    background: #00acc1;
    transform: scale(1.1);
}

/* Repères sur la carte */
.map-landmarks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

.landmark {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7em;
    font-weight: bold;
    color: #333;
    border: 2px solid #00bcd4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translate(-50%, -50%);
}

/* Marqueurs de propositions */
.proposition-marker {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 60;
}

.proposition-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
    z-index: 70;
}

.proposition-marker.infrastructure { background: #ff5722; }
.proposition-marker.tourisme { background: #4caf50; }
.proposition-marker.education { background: #2196f3; }
.proposition-marker.technologie { background: #9c27b0; }
.proposition-marker.environnement { background: #8bc34a; }
.proposition-marker.culture { background: #ff9800; }
.proposition-marker.economie { background: #607d8b; }
.proposition-marker.social { background: #e91e63; }

/* Marqueur temporaire */
.temp-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #00bcd4;
    border: 3px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 80;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.7; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Tooltip pour les marqueurs */
.marker-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8em;
    max-width: 200px;
    z-index: 90;
    pointer-events: none;
    transform: translate(-50%, -100%);
    margin-top: -10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.marker-tooltip.show {
    opacity: 1;
}

.marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Panel de participation optimisé pour mobile */
.participation-panel {
    width: 400px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-left: 3px solid #00bcd4;
    overflow-y: auto;
    position: relative;
}

.panel-header {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    color: white;
    padding: 20px;
    text-align: center;
}

.panel-header h2 {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.form-section {
    padding: 25px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.location-info {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    text-align: center;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #00bcd4, #0097a7);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.4);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Section des propositions récentes */
.recent-section {
    border-top: 2px solid #eee;
    padding: 20px;
    background: #f8f9fa;
}

.recent-section h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
}

.recent-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #00bcd4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recent-item h4 {
    color: #333;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.recent-item p {
    color: #666;
    font-size: 0.8em;
    margin-bottom: 8px;
}

.recent-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7em;
    color: #999;
}

.like-btn {
    background: #e91e63;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.7em;
}

/* Footer avec liens */
.footer-links {
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 1px solid #eee;
}

.footer-links a {
    color: #00bcd4;
    text-decoration: none;
    margin: 0 10px;
    font-size: 0.9em;
    font-weight: bold;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive design amélioré */
@media (max-width: 768px) {
    .header {
        height: 50px;
        padding: 5px 10px;
    }

    .logo-section img {
        height: 30px;
    }

    .main-title {
        font-size: 1.2em;
    }

    .subtitle {
        font-size: 0.7em;
    }

    .stats-number {
        font-size: 1.2em;
    }

    .main-container {
        margin-top: 50px;
        flex-direction: column;
        height: calc(100vh - 50px);
    }

    .map-section {
        height: 50vh;
        order: 1;
    }

    .participation-panel {
        width: 100%;
        height: 50vh;
        order: 2;
        border-left: none;
        border-top: 3px solid #00bcd4;
    }

    .zoom-controls {
        top: 10px;
        right: 10px;
    }

    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .landmark {
        font-size: 0.6em;
        padding: 2px 6px;
    }

    .proposition-marker {
        width: 25px;
        height: 25px;
        font-size: 14px;
    }

    .form-section {
        padding: 15px;
    }

    .panel-header {
        padding: 15px;
    }

    .panel-header h2 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .header {
        height: 45px;
    }

    .main-title {
        font-size: 1em;
    }

    .subtitle {
        display: none;
    }

    .main-container {
        margin-top: 45px;
        height: calc(100vh - 45px);
    }

    .map-section {
        height: 45vh;
    }

    .participation-panel {
        height: 55vh;
    }

    .form-section {
        padding: 10px;
    }

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

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 13px;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-message {
    background: #4caf50;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.error-message {
    background: #f44336;
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
}

#map-content {
    position: relative;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
}
