:root { --primary: #e67e22; --dark: #121212; --card: #1e1e1e; }
body { margin: 0; font-family: sans-serif; background: #000; color: #eee; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

/* HEADER */
header { background: var(--dark); padding: 12px; border-bottom: 2px solid var(--primary); flex-shrink: 0; }
.top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.date-picker-box { background: #222; border: 1px solid #444; padding: 5px 10px; border-radius: 20px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.date-picker-box input { background: transparent; border: none; color: white; width: 25px; cursor: pointer; }
.search-row { display: flex; flex-direction: column; gap: 8px; }
#city-search { width: 100%; padding: 10px; background: #1a1a1a; border: 1px solid #333; border-radius: 8px; color: white; box-sizing: border-box; }
.suggestions-list { position: absolute; top: 100%; left: 0; right: 0; background: #222; z-index: 2000; display: none; border-radius: 0 0 8px 8px; border: 1px solid #444; max-height:200px; overflow-y:auto; box-shadow: 0 4px 10px rgba(0,0,0,0.8); }
.suggestion-item { padding: 12px; border-bottom: 1px solid #333; cursor: pointer; }

/* TABS */
.tab-bar { display: flex; background: #1a1a1a; flex-shrink: 0; }
.tab { flex: 1; text-align: center; padding: 15px; cursor: pointer; color: #666; font-weight: bold; border-bottom: 2px solid #333; }
.tab.active { color: var(--primary); border-bottom: 2px solid var(--primary); background: #111; }
.filter-bar { display: flex; overflow-x: auto; padding: 10px; gap: 8px; background: #0a0a0a; flex-shrink: 0; }
.tag { white-space: nowrap; padding: 6px 12px; border-radius: 20px; background: #222; font-size: 0.75rem; border: 1px solid #444; cursor: pointer; }
.tag.active { background: var(--primary); border-color: var(--primary); }

/* VIEWS */
#view-container { flex: 1; position: relative; }
#map-view, #feed-view { position: absolute; top:0; left:0; right:0; bottom:0; width: 100%; height: 100%; }
#map { height: 100%; width: 100%; }
#feed-view { overflow-y: auto; padding: 10px; box-sizing: border-box; }

/* MAP MARKERS */
.marker-container { display: flex; flex-direction: column; align-items: center; width: 60px; }
.marker-label { background: rgba(0,0,0,0.8); color: white; font-size: 0.6rem; padding: 2px 5px; border-radius: 5px; margin-top: 2px; white-space: nowrap; z-index: 999; }
@keyframes pulse-active {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(230, 126, 34, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(230, 126, 34, 0); }
}
.marker-balloon { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--primary); background: white; overflow: hidden; box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.marker-balloon.live-now { animation: pulse-active 2s infinite; border-color: #ffaa00; z-index: 100; }
.marker-balloon img { width: 100%; height: 100%; object-fit: cover; }
.marker-diamond { width: 36px; height: 36px; background: #000; border: 2px solid #00f3ff; transform: rotate(45deg); overflow: hidden; box-shadow: 0 0 8px rgba(0, 243, 255, 0.5); margin-bottom: 10px; }
.marker-diamond img { width: 140%; height: 140%; object-fit: cover; transform: rotate(-45deg) translate(-15%, -15%); }

/* MODALS & PANELS */
.modal-full, #forum-panel { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100dvh; 
    background: #000; /* Noir total pour bien masquer le fond */
    z-index: 10000; /* Valeur augmentée pour dominer Leaflet */
    display: none; 
    flex-direction: column; 
    box-sizing: border-box; 
}
#forum-panel { padding: 0; }
#add-modal, #auth-modal, #admin-modal { padding: 20px; overflow-y: auto; }
.forum-header, .form-header { padding: 15px; background: rgba(20, 20, 20, 0.95); border-bottom: 1px solid var(--primary); display: flex; align-items: center; gap: 15px; backdrop-filter: blur(5px); flex-shrink: 0; }
.form-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-top: 20px; }

/* CHAT SEXY */
.comment-list { flex: 1; overflow-y: auto; padding: 20px 15px; display: flex; flex-direction: column; gap: 15px; background-image: radial-gradient(#1a1a1a 1px, transparent 1px); background-size: 20px 20px; }
.msg-row { display: flex; gap: 10px; align-items: flex-end; animation: slideIn 0.3s ease-out; max-width: 85%; }
.msg-avatar { width: 35px; height: 35px; border-radius: 6px; background: #222; border: 1px solid #444; flex-shrink: 0; }
.msg-bubble { background: #1e1e1e; padding: 10px 14px; border-radius: 12px 12px 12px 0; border: 1px solid #333; color: #eee; font-size: 0.9rem; position: relative; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
.msg-header { font-size: 0.7rem; color: var(--primary); font-weight: bold; margin-bottom: 4px; font-family: monospace; }
.msg-row.me { align-self: flex-end; flex-direction: row-reverse; }
.msg-row.me .msg-bubble { background: #2c1e05; border-color: var(--primary); border-radius: 12px 12px 0 12px; }
.msg-row.me .msg-header { color: #fff; }
.reply-thread { border-left: 2px solid #333; margin-left: 18px; padding-left: 10px; margin-top: 5px; }
.reply-bubble { background: #111; padding: 8px; border-radius: 6px; font-size: 0.8rem; color: #aaa; margin-top: 5px; border: 1px solid #222; cursor: pointer; transition: all 0.2s; position: relative; }
.reply-bubble:hover { background: #222; border-color: #444; color: #fff; }
.btn-reply-action { font-size: 0.7rem; color: #666; cursor: pointer; margin-top: 5px; text-align: right; display: block; }
.btn-reply-action:hover { color: var(--primary); }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ADMIN PANEL */
.admin-stat-card { flex: 1; background: #222; border: 1px solid #444; padding: 15px; border-radius: 8px; text-align: center; }
.admin-stat-card h3 { margin: 0; font-size: 0.8rem; color: #888; }
.admin-stat-card span { font-size: 1.5rem; font-weight: bold; color: #e74c3c; }
.admin-list { overflow-y: auto; flex: 1; }
.admin-item { display: flex; justify-content: space-between; align-items: center; background: #1a1a1a; padding: 10px; border-bottom: 1px solid #333; }
.btn-delete { background: #c0392b; color: white; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.btn-delete:hover { background: #e74c3c; }
.btn-edit { background: #f1c40f; color: black; border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; font-weight: bold; }
.btn-edit:hover { background: #f39c12; }

/* UI ELEMENTS */
.segment-control { display: flex; flex-wrap: wrap; background: #222; padding: 4px; border-radius: 10px; gap: 4px; margin: 10px 0; }
.segment-item { flex: 1; min-width: 80px; text-align: center; padding: 10px; border-radius: 8px; font-size: 0.8rem; cursor: pointer; color: #888; }
.segment-item.active { background: var(--primary); color: white; }
.input-full { width: 100%; padding: 12px; margin-bottom: 10px; background: #222; border: 1px solid #444; color: white; border-radius: 8px; box-sizing: border-box; }
.btn-main { width: 100%; padding: 15px; background: var(--primary); border: none; color: white; font-weight: bold; border-radius: 10px; cursor: pointer; }
.fab { position: fixed; bottom: 20px; right: 20px; width: 60px; height: 60px; border-radius: 30px; background: var(--primary); color: white; font-size: 2rem; border: none; z-index: 5000; }
.btn-gps { background: #222; border: 1px solid var(--primary); color: var(--primary); width: 50px; border-radius: 8px; cursor: pointer; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; transition: all 0.2s; margin-bottom: 10px; }
.duplicate-box { background: rgba(255, 68, 68, 0.1); border: 1px solid #ff4444; padding: 10px; border-radius: 8px; margin-bottom: 15px; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.flatpickr-calendar { background: #1a1a1a; border: 1px solid var(--primary); box-shadow: 0 10px 30px rgba(0,0,0,0.8); }
.flatpickr-day.selected { background: var(--primary); border-color: var(--primary); color: #000; font-weight: bold; }
.comment-input-area { padding: 15px; background: #111; border-top: 1px solid #333; display: flex; gap: 0; }
.btn-cam { background: #222; color: #888; border: 1px solid #333; border-right: none; width: 45px; border-radius: 8px 0 0 8px; font-size: 1.2rem; cursor: pointer; transition: 0.2s; }
.btn-cam:hover { background: #333; color: #fff; }
#c-input { flex: 1; padding: 12px; background: #000; border: 1px solid #333; color: white; border-radius: 0 8px 8px 0; outline: none; }
#c-input:focus { border-color: var(--primary); }
.loot-card { display: flex; background: var(--card); margin-bottom: 10px; border-radius: 10px; height: 90px; overflow: hidden; border: 1px solid #333; }
.loot-card-img { width: 90px; height: 90px; object-fit: cover; }
.loot-card-content { flex: 1; padding: 10px; display: flex; flex-direction: column; justify-content: center; }
.tier-common { border-left: 4px solid #bdc3c7; }
.tier-legendary { border-left: 4px solid #f1c40f; background: linear-gradient(90deg, #1e1e1e 0%, #2c2505 100%); }
.rarity-badge { font-size: 0.65rem; text-transform: uppercase; font-weight: 900; padding: 2px 6px; border-radius: 2px; background: #000; border: 1px solid #333; margin-left: 10px; }
.com-img-preview { max-width: 100%; border-radius: 6px; margin-top: 8px; border: 1px solid rgba(255,255,255,0.1); }

/* ... Tes styles précédents ... */

/* STYLE DU BOUTON UPLOAD DANS LE FORMULAIRE */
.form-photo-upload {
    background: #1a1a1a;
    border: 2px dashed #444;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 15px;
    color: #888;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.form-photo-upload:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #222;
}

.form-photo-upload span {
    font-weight: bold;
    font-size: 0.9rem;
}

/* Container de recherche (Barre du haut) */
.search-box {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(20, 20, 20, 0.8);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #333;
    margin-bottom: 15px;
}

#city-search {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 10px;
    outline: none;
}

/* Style commun pour les boutons GPS 🎯 */
#btn-gps-search, #btn-gps-target {
    background: var(--surface, #1a1a1a);
    color: white;
    border: 1px solid #444;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    min-width: 45px;
    height: 45px;
}

/* Effet au survol */
#btn-gps-search:hover, #btn-gps-target:hover {
    background: #2a2a2a;
    border-color: #e67e22; /* Ta couleur orange primaire */
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(230, 126, 34, 0.3);
}

/* État quand le GPS charge (⏳) */
#btn-gps-search:disabled, #btn-gps-target:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Style spécifique pour le bouton dans le formulaire d'ajout */
#btn-gps-target {
    width: 100%; /* Prend toute la largeur dans le formulaire mobile */
    margin-top: 10px;
    font-size: 0.9rem;
    gap: 10px; /* Espace entre l'emoji et le texte */
}

/* Animation "Scan" quand on clique (Optionnel) */
@keyframes pulse-gps {
    0% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(230, 126, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0); }
}

.gps-active {
    animation: pulse-gps 1.5s infinite;
}