/* carte.css */

/* La page s'affiche en flex pour gérer l'espace vertical */
body.map-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding-top: 80px;
}

/* === MODE APPLICATION (PWA STANDALONE) === */
@media (display-mode: standalone) {
    body.map-page {
        padding-top: 0;
    }

    /* Masquer navbar et footer */
    .navbar,
    .mobile-menu,
    footer {
        display: none !important;
    }

    /* La carte occupe tout l'écran */
    .map-main {
        height: 100dvh;
    }

    /* Afficher le logo de l'association en bas à gauche */
    #pwa-app-logo {
        display: flex !important;
    }

    /* Garder le bouton d'installation visible sur la carte */
    .legend-divider {
        display: none !important;
    }

    /* Masquer le bouton d'installation en mode app */
    #pwa-legend-btn {
        display: none !important;
    }
}

/* Logo Apicool affiché uniquement en mode app */
#pwa-app-logo {
    display: none;
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    padding: 0.4rem 0.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
    /* non cliquable */
}

#pwa-app-logo img.logo-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

#pwa-app-logo img.logo-text {
    height: 16px;
    width: auto;
    object-fit: contain;
}

/* Masquer l'attribution Leaflet (copyright bas-droite) */
.leaflet-control-attribution {
    display: none !important;
}

/* La section principale prend tout l'espace disponible */
.map-main {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* La carte prend 100% de la largeur et hauteur de map-main */
#map {
    flex: 1;
    width: 100%;
    min-height: 70vh;
    z-index: 1;
}

.map-attribution {
    flex: 0 0 auto;
    padding: 0.3rem 0.85rem 0.45rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.72rem;
    line-height: 1.2;
    color: rgba(60, 60, 60, 0.72);
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
}

.map-attribution a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

/* === LÉGENDE === */
#map-legend {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 990;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
    min-width: 200px;
}

.legend-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 1rem 0 0.8rem;
}

/* Bouton d'installation dans la légende */
.pwa-legend-install-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pwa-legend-install-fab {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 995;
    width: auto;
    min-width: 0;
    box-shadow: 0 8px 22px rgba(230, 126, 34, 0.28);
}

.pwa-legend-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 126, 34, 0.4);
}

@media (max-width: 768px) {
    body.map-page {
        padding-top: 60px;
    }

    #map-legend {
        top: 12px;
        bottom: auto;
        right: 12px;
        transform: none;
        width: auto;
        min-width: 0;
        max-width: min(180px, 46vw);
        padding: 0.6rem 0.65rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    #map-legend h3 {
        font-size: 0.95rem;
        margin-bottom: 0.45rem;
        padding-bottom: 0.2rem;
    }

    #map-legend h3::after {
        width: 24px;
        height: 2px;
    }

    #map-legend ul {
        gap: 0.4rem;
    }

    #map-legend li {
        gap: 0.45rem;
        font-size: 0.83rem;
        line-height: 1.2;
    }

    .legend-color {
        width: 13px;
        height: 13px;
        border-width: 1.5px;
    }

    .legend-divider {
        margin: 0.5rem 0 0.45rem;
    }

    .pwa-legend-install-btn {
        min-height: 34px;
        padding: 0.45rem 0.5rem;
        font-size: 0.82rem;
        gap: 0.35rem;
    }

    .pwa-legend-install-fab {
        top: 12px;
        right: 12px;
        max-width: min(180px, 46vw);
    }
}

#map-legend h3 {
    font-family: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    position: relative;
    padding-bottom: 0.5rem;
}

#map-legend h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #e67e22;
    border-radius: 2px;
}

#map-legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

#map-legend li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    color: #444;
}

.legend-color {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.legend-color.nid {
    background-color: #e67e22;
}

.legend-color.zone {
    background-color: #27ae60;
}

.legend-color.rucher {
    background-color: #f1c40f;
}

/* === POPUPS LEAFLET === */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0.2rem;
}

.leaflet-popup-content h4 {
    margin: 0 0 0.4rem 0;
    font-family: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    font-size: 1.1rem;
    color: #333;
}

.leaflet-popup-content p {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.leaflet-container a.leaflet-popup-close-button {
    top: 8px;
    right: 8px;
    color: #999;
}

/* === BANNIÈRE PWA === */
.pwa-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 2000;
    background: white;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: calc(100% - 3rem);
    max-width: 620px;
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.pwa-banner.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: 1;
    min-width: 0;
}

.pwa-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pwa-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.pwa-text strong {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #222;
}

.pwa-text span {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.85rem;
    color: #777;
    line-height: 1.35;
}

.pwa-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.pwa-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #34495e;
    background: #f4f6f8;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.pwa-platform-badge svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex-shrink: 0;
}

.pwa-platform-android {
    color: #2e7d32;
    background: rgba(46, 125, 50, 0.1);
}

.pwa-platform-apple {
    color: #5f6368;
    background: rgba(95, 99, 104, 0.1);
}

.pwa-platform-desktop {
    color: #1f5aa6;
    background: rgba(31, 90, 166, 0.1);
}

.pwa-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pwa-btn-install {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.1rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.pwa-btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(230, 126, 34, 0.4);
}

.pwa-btn-dismiss {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.3rem;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.pwa-btn-dismiss:hover {
    color: #555;
    background: rgba(0, 0, 0, 0.06);
}

/* === MODALE iOS === */
.pwa-ios-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.pwa-ios-modal[hidden] {
    display: none;
}

.pwa-ios-modal.visible {
    opacity: 1;
    pointer-events: auto;
}

.pwa-ios-card {
    background: white;
    border-radius: 20px;
    padding: 1.8rem;
    max-width: 360px;
    width: calc(100% - 2rem);
    position: relative;
    text-align: center;
    max-height: calc(100vh - 2rem);
    overflow: auto;
    transform: translateY(30px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.pwa-ios-modal.visible .pwa-ios-card {
    transform: translateY(0);
}

.pwa-ios-card h4 {
    font-family: ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;
    font-size: 1.3rem;
    margin: 0.5rem 0;
    color: #222;
}

.pwa-ios-card p {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0.5rem 0 1.2rem;
}

.pwa-ios-steps {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    text-align: left;
    margin-bottom: 1.5rem;
}

.pwa-ios-step {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    color: #444;
}

.pwa-ios-step-num {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.pwa-ios-close {
    width: 100%;
    padding: 0.8rem;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: background 0.2s;
}

.pwa-ios-close:hover {
    background: #ebebeb;
}

.pwa-ios-close-x {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #aaa;
    cursor: pointer;
}

.pwa-install-modal .pwa-ios-card {
    max-width: 460px;
    text-align: left;
}

.pwa-install-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    margin: 0 auto 0.5rem;
    display: block;
}

.pwa-install-card h4,
.pwa-install-card p {
    text-align: center;
}

.pwa-install-modal .pwa-ios-card h4,
.pwa-install-modal .pwa-ios-card p {
    text-align: center;
}

.pwa-install-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0 0 1rem;
}

.pwa-install-or {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -0.25rem 0 0.85rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #8b8b8b;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.pwa-install-primary,
.pwa-install-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.pwa-install-primary {
    background: linear-gradient(135deg, #e67e22, #f39c12);
    color: white;
    border: none;
    box-shadow: 0 6px 18px rgba(230, 126, 34, 0.24);
}

.pwa-install-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(230, 126, 34, 0.3);
}

.pwa-install-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pwa-install-secondary {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #5f6368;
}

.pwa-install-secondary:hover {
    background: rgba(0, 0, 0, 0.04);
}

.pwa-install-platforms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
}

.pwa-install-steps {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    text-align: left;
    margin-bottom: 1rem;
}

.pwa-install-steps .pwa-ios-step {
    align-items: center;
}

.pwa-ios-step {
    display: flex;
    gap: 0.8rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    color: #444;
}

.pwa-ios-visual-step {
    align-items: flex-start;
}

.pwa-ios-step-icon {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}

.pwa-ios-step-copy {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.35;
}

.pwa-ios-step-media {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.pwa-install-close-bottom {
    margin-top: auto;
}

.pwa-ios-corner-hint {
    position: fixed;
    right: 0.9rem;
    bottom: 0.75rem;
    z-index: 3200;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    pointer-events: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.pwa-ios-corner-hint.visible {
    opacity: 1;
    transform: translateY(0);
}

.pwa-ios-corner-hint-arrow {
    font-size: 8.4rem;
    line-height: 1;
    color: #e67e22;
    font-weight: 800;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.pwa-ios-corner-hint-text {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    color: #666;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    margin-right: 0.2rem;
}

@media (max-width: 768px) {
    .pwa-install-or {
        margin-top: 0;
        margin-bottom: 0.7rem;
    }

    .pwa-ios-step-icon {
        width: 30px;
        height: 30px;
    }

    .pwa-ios-step-copy {
        font-size: 0.9rem;
    }

    .pwa-ios-corner-hint {
        right: 0.6rem;
        bottom: 0.55rem;
    }

    .pwa-ios-corner-hint-arrow {
        font-size: 7.2rem;
    }

    .pwa-ios-corner-hint-text {
        font-size: 0.72rem;
    }
}

/* ============================================================
   AJOUTER UN POINT — BOUTON FLOTTANT (FAB)
   ============================================================ */
#add-point-btn {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 995;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.4rem;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.38), 0 2px 6px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, opacity 0.22s ease;
    white-space: nowrap;
}

#add-point-btn:hover:not(:disabled) {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.48), 0 4px 10px rgba(0,0,0,0.18);
}

#add-point-btn:disabled,
#add-point-btn.limit-reached {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    cursor: not-allowed;
    opacity: 0.75;
    transform: translateX(-50%);
}

#add-point-btn.placement-active {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
    animation: pulse-btn 1.6s ease-in-out infinite;
}

#add-point-btn.placement-active:hover:not(:disabled) {
    transform: translateX(-50%) translateY(-2px);
}

@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4); }
    50%       { box-shadow: 0 8px 32px rgba(220, 38, 38, 0.65); }
}

@media (max-width: 768px) {
    #add-point-btn {
        bottom: 52px;
        font-size: 0.87rem;
        padding: 0.65rem 1.1rem;
    }
}

/* Mode placement actif : curseur en croix sur la carte */
.map-main.placement-active #map {
    cursor: crosshair;
}

/* ============================================================
   AJOUTER UN POINT — POPUP LEAFLET FORMULAIRE
   ============================================================ */
.add-point-popup {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 250px;
    max-width: 290px;
}

.add-point-popup h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.add-point-popup .field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.add-point-popup label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.add-point-popup input[type="text"],
.add-point-popup textarea,
.add-point-popup select {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1e293b;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
}

.add-point-popup input[type="text"]:focus,
.add-point-popup textarea:focus,
.add-point-popup select:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    background: #fff;
}

.add-point-popup textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.45;
}

.add-point-popup .popup-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.add-point-popup .btn-save-point {
    flex: 1;
    padding: 0.55rem 0.9rem;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 3px 10px rgba(22, 163, 74, 0.28);
}

.add-point-popup .btn-save-point:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(22, 163, 74, 0.4);
}

.add-point-popup .btn-cancel-point {
    padding: 0.55rem 0.9rem;
    background: #f1f5f9;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.add-point-popup .btn-cancel-point:hover {
    background: #e2e8f0;
    color: #334155;
}

.add-point-popup .error-msg {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: none;
}

.add-point-popup .error-msg.visible {
    display: block;
}

/* Popup pour les points de l'utilisateur : bouton suppression */
.user-point-popup {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-width: 200px;
}

.user-point-popup h4 {
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.user-point-popup p {
    margin: 0 0 0.75rem 0;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.45;
}

.user-point-popup .btn-delete-user-point {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.5rem 0.85rem;
    background: #fff1f2;
    color: #dc2626;
    border: 1.5px solid rgba(220, 38, 38, 0.25);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, box-shadow 0.18s ease;
    box-sizing: border-box;
}

.user-point-popup .btn-delete-user-point:hover {
    background: #fee2e2;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.2);
}

/* Notification limite atteinte */
#point-limit-notice {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    z-index: 996;
    background: #fff;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.6rem 1.1rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.83rem;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

#point-limit-notice.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

@media (max-width: 768px) {
    #point-limit-notice {
        bottom: 100px;
        font-size: 0.78rem;
        padding: 0.5rem 0.9rem;
        max-width: calc(100vw - 2rem);
        white-space: normal;
        text-align: center;
    }
}
