/* Global styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(to bottom, #0f2027, #203a43, #2c5364);
    color: #e0e0e0;
    font-size: 16px;
}

h1, h2, h3 {
    font-weight: 600;
    color: #f0f8ff;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

/* Navbar styles */
.navbar {
    background-color: #1b1f3a;
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.navbar h1 {
    margin: 0;
    font-size: 2.5rem;
    letter-spacing: 1px;
}

.nav-links {
    margin-top: 0.5rem;
}

.nav-links a {
    color: #9daaf2;
    text-decoration: none;
    margin: 0 0.8rem;
    font-weight: bold;
    transition: color 0.3s;
    font-size: 1.5rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: #f8f8ff;
    border-bottom: 2px solid #f8f8ff;
}

/* Search and Sort */
.search-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 1rem auto;
    padding: 0 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-form input[type="text"] {
    padding: 0.5rem;
    width: 60%;
    max-width: 400px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background: #1c1e2f;
    color: #e0e0e0;
}

.search-form input[type="submit"] {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    border: none;
    background: #3949ab;
    color: white;
    cursor: pointer;
}

.search-form input[type="submit"]:hover {
    background: #5c6bc0;
}

.sort-select label {
    margin-right: 0.5rem;
    font-weight: bold;
    color: #f0f0f0;
}

.sort-select select {
    padding: 0.4rem;
    border-radius: 8px;
    background: #1c1e2f;
    color: #e0e0e0;
    border: 1px solid #ccc;
}

/* Title */
.section-title {
    text-align: center;
    margin-top: 1rem;
    font-size: 1.5rem;
    color: #eeeeee;
}

/* Map Grid */
.map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

/* Map Cards */
.map-card {
    background: #263238;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    padding: 1rem;
    text-decoration: none;
    color: #e0e0e0;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
}

.map-card img {
    max-width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.map-card h2 {
    margin: 0.5rem 0 0;
    font-size: 1.1rem;
    color: #bbdefb;
}

/* Map Detail Page */
.map-detail {
    max-width: 800px;
    margin: 2rem auto;
    background: #263238;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.6);
    padding: 2rem;
    text-align: center;
    color: #000000;
}

.map-detail img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 12px;
}

.map-detail h1 {
    color: #000000;
}

.map-detail p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.map-detail a {
    color: #000000;
    text-decoration: none;
    font-weight: bold;
}

.map-detail a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .search-sort-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form input[type="text"] {
        width: 100%;
    }

    .map-grid {
        grid-template-columns: 1fr;
        padding: 0.5rem;
    }
}

/* Formulaire JS */
.add-map-form {
    max-width: 600px;
    margin: 2rem auto;
    background: #1e293b;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    color: #f0f0f0;
}

.add-map-form h2 {
    margin-bottom: 1rem;
    color: #bbdefb;
}

.add-map-form label {
    display: block;
    margin-top: 1rem;
    font-weight: bold;
}

.add-map-form input,
.add-map-form select,
.add-map-form textarea {
    width: 100%;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-top: 0.3rem;
    background: #1c1e2f;
    color: #e0e0e0;
}

.add-map-form button {
    margin-top: 1.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: #3949ab;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.add-map-form button:hover {
    background: #5c6bc0;
}

.site-footer {
    background: #1e2f3a;
    color: #ddd;
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.95rem;
    margin-top: 3rem;
    border-top: 1px solid #3a4b57;
}

.site-footer strong {
    color: #fff;
}

.site-footer a {
    color: #80d0ff;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer em {
    font-style: italic;
}

.legal-page {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #1f2f3a;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: #e2e2e2;
    line-height: 1.6;
}

.legal-page h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.legal-page a {
    color: #80d0ff;
}