/* v2 carte */

* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    font-family: "Google Sans Code", monospace;
    overflow-x: hidden;
    color: #2c3e50;
    min-height: 100vh;
}



/* ------------------- header -------------------- */
h2 {
    text-align: center;
    padding-top: 140px;
    margin-bottom: 50px;
    font-size: 3.5em;
    color: #2c3e50;
    font-weight: 700;
    position: relative;
    animation: fadeInDown 0.8s ease-out;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 5px;
    background: linear-gradient(90deg, #CC0303, #ff4444);
    border-radius: 3px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ------------------------ section principale ---------------------- */
section {
    padding: 0 80px 80px;
    max-width: 1800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 50px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

/* --------------------------- conteneur carte ------------------------- */
#map {
    height: 750px;
    width: 100%;
    border-radius: 35px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid white;
    position: relative;
}

#map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 35px;
    box-shadow: inset 0 0 30px rgba(204, 3, 3, 0.1);
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#map:hover::before {
    opacity: 1;
}

#map:hover {
    box-shadow: 0 25px 70px rgba(204, 3, 3, 0.2);
    transform: translateY(-8px);
}


.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: white !important;
    color: #CC0303 !important;
    border: none !important;
    font-size: 20px !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    transition: all 0.3s ease !important;
}

.leaflet-control-zoom a:hover {
    background: #CC0303 !important;
    color: white !important;
}


.leaflet-popup-content-wrapper {
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(204, 3, 3, 0.2);
}

.leaflet-popup-content {
    margin: 18px;
    font-family: "Google Sans Code", monospace;
    line-height: 1.7;
    min-width: 200px;
}

.leaflet-popup-content b {
    color: #CC0303;
    font-size: 1.2em;
    display: block;
    margin-bottom: 8px;
}

.leaflet-popup-content a {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #CC0303, #ff4444);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(204, 3, 3, 0.3);
}

.leaflet-popup-content a:hover {
    background: linear-gradient(135deg, #990202, #CC0303);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 3, 3, 0.4);
}

.leaflet-popup-tip {
    border-top-color: rgba(204, 3, 3, 0.2) !important;
}

/* --------------- panneau filtres -----------------  */
#filters {
    background: white;
    padding: 45px;
    border-radius: 35px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    height: fit-content;
    position: sticky;
    top: 120px;
}

#filters:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}

#filters h3 {
    color: #CC0303;
    font-size: 2em;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

#filters h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 70%;
    height: 4px;
    background: linear-gradient(90deg, #CC0303, #ff4444);
    border-radius: 2px;
}

/* ------------------- input search ------------------------- */
#search {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 25px;
    border: 2px solid #e8ecf1;
    border-radius: 15px;
    font-family: "Google Sans Code", monospace;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#search:focus {
    outline: none;
    border-color: #CC0303;
    background: white;
    box-shadow: 0 0 0 4px rgba(204, 3, 3, 0.1);
    transform: translateY(-2px);
}

#search::placeholder {
    color: #95a5a6;
    font-style: italic;
}

/* ---------------------------------- options filtre --------------------------- */
.filter-group {
    margin: 25px 0;
}

#filters label {
    display: block;
    margin: 15px 0;
    color: #34495e;
    font-weight: 500;
    font-size: 1.05em;
    transition: all 0.3s ease;
}

#filters input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #CC0303;
    vertical-align: middle;
}

#filters label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 14px 18px;
    border-radius: 12px;
    transition: all 0.3s ease;
    margin: 12px 0;
    border: 2px solid transparent;
}

#filters label:has(input[type="checkbox"]):hover {
    background: rgba(204, 3, 3, 0.05);
    border-color: rgba(204, 3, 3, 0.2);
    transform: translateX(5px);
}


#filters input[type="text"]:not(#search) {
    width: 100%;
    padding: 14px 18px;
    margin-top: 8px;
    margin-bottom: 20px;
    border: 2px solid #e8ecf1;
    border-radius: 12px;
    font-family: "Google Sans Code", monospace;
    font-size: 0.95em;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#filters input[type="text"]:not(#search):focus {
    outline: none;
    border-color: #CC0303;
    background: white;
    box-shadow: 0 0 0 3px rgba(204, 3, 3, 0.1);
}

/* ---------------------- Bouton recherche ------------------------- */
#btnSearch {
    width: 100%;
    padding: 18px;
    margin-top: 30px;
    border: none;
    background: linear-gradient(135deg, #CC0303 0%, #ff4444 100%);
    color: white;
    font-weight: 700;
    font-size: 1.2em;
    cursor: pointer;
    border-radius: 15px;
    font-family: "Google Sans Code", monospace;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(204, 3, 3, 0.35);
    position: relative;
    overflow: hidden;
}

#btnSearch::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#btnSearch:hover::before {
    width: 300px;
    height: 300px;
}

#btnSearch:hover {
    background: linear-gradient(135deg, #990202 0%, #CC0303 100%);
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(204, 3, 3, 0.45);
}

#btnSearch:active {
    transform: translateY(-2px);
}

/* ---------------------- responsive --------------------- */
@media screen and (max-width: 1800px) {
    .navbar a {
        font-size: 1em;
    }
    
    .logo {
        width: 250px;
    }
    
    section {
        padding: 0 60px 60px;
        grid-template-columns: 1fr 400px;
        gap: 40px;
    }
}

@media screen and (max-width: 1500px) {
    .navbar a {
        font-size: 0.9em;
    }
    
    .navbar .nav-links ul {
        gap: 10px;
    }
    
    .navbar .nav-links ul li {
        margin: 0 8px;
    }
    
    section {
        grid-template-columns: 1fr 380px;
    }
    
    #filters {
        padding: 35px;
    }
}

@media screen and (max-width: 1200px) {
    section {
        grid-template-columns: 1fr;
        padding: 0 40px 60px;
        gap: 40px;
    }
    
    #map {
        height: 600px;
    }
    
    #filters {
        position: relative;
        top: 0;
    }
    
    h2 {
        font-size: 3em;
        padding-top: 120px;
    }
    
    .navbar {
        padding: 15px 30px;
    }
    
    .navbar .menu-hamburger {
        display: block;
        position: absolute;
        right: 30px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .logo {
        width: 200px;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        width: 100%;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-left: -100%;
        transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 999;
    }
    
    .nav-links ul {
        flex-direction: column;
        gap: 20px;
    }
    
    .navbar .nav-links ul li {
        margin: 20px 0;
    }
    
    .navbar a {
        font-size: 1.8em;
        color: white;
    }
    
    .navbar a::after {
        background: linear-gradient(90deg, #fff, #CC0303);
    }
    
    .navbar a:hover {
        color: #ff4444;
    }
    
    .mobile-menu {
        margin-left: 0;
    }
}

@media screen and (max-width: 768px) {
    section {
        padding: 0 25px 50px;
    }
    
    h2 {
        font-size: 2.5em;
        padding-top: 110px;
        margin-bottom: 40px;
    }
    
    h2::after {
        width: 150px;
        height: 4px;
    }
    
    #map {
        height: 450px;
        border-radius: 25px;
        border-width: 3px;
    }
    
    #filters {
        padding: 30px;
        border-radius: 25px;
    }
    
    #filters h3 {
        font-size: 1.7em;
    }
    
    #btnSearch {
        font-size: 1.1em;
        padding: 16px;
    }
}

@media screen and (max-width: 600px) {
    .navbar {
        padding: 10px 20px;
    }
    
    .logo {
        width: 150px;
    }
    
    .navbar .menu-hamburger {
        right: 20px;
        width: 30px;
    }
    
    h2 {
        font-size: 2em;
        padding-top: 100px;
        margin-bottom: 35px;
    }
    
    h2::after {
        width: 120px;
        height: 3px;
    }
    
    section {
        padding: 0 15px 40px;
    }
    
    #map {
        height: 400px;
        border-radius: 20px;
    }
    
    #filters {
        padding: 25px;
        border-radius: 20px;
    }
    
    #filters h3 {
        font-size: 1.5em;
    }
    
    #btnSearch {
        padding: 14px;
        font-size: 1em;
    }
}

html {
    scroll-behavior: smooth;
}

/* ------------------------- scrollbar custom ---------------------------------- */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #CC0303, #ff4444);
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #990202, #CC0303);
}

/* ---------------------------------- chargement ----------------------------- */
.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.4s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
