/* Brand Flags Map v5 */

.bf-wrapper { margin:1.5rem 0; font-family:inherit; }

/* Stats */
.bf-stats { display:flex; gap:12px; margin-bottom:14px; flex-wrap:wrap; }
.bf-stat  { flex:1; min-width:90px; background:#f5f5f3; border-radius:10px; padding:12px 16px; text-align:center; }
.bf-num   { display:block; font-size:26px; font-weight:500; color:#1a1a1a; line-height:1.2; }
.bf-lbl   { display:block; font-size:12px; color:#888; margin-top:2px; }

/* Carte */
#bf-map { width:100%; border-radius:10px; border:1px solid #e2e2de; overflow:hidden; z-index:0; }

/* Légende */
.bf-legend { display:flex; gap:14px; margin-top:10px; font-size:12px; color:#555; flex-wrap:wrap; align-items:center; }
.bf-legend-label { font-weight:500; color:#888; }
.bf-dens-item { display:inline-flex; align-items:center; gap:5px; }
.bf-dens-circle { display:inline-block; border-radius:50%; }
.bf-dens-1 { width:12px; height:12px; background:#ebc4ab; border:1.5px solid #d4a07a; }
.bf-dens-2 { width:18px; height:18px; background:#e0956a; border:1.5px solid #c06f3a; }
.bf-dens-3 { width:24px; height:24px; background:#c96a30; border:1.5px solid #9e4a18; }
.bf-cabin-mini {
    display:inline-block; width:16px; height:18px;
    background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpolygon points='2,13 12,3 22,13' fill='%23ebc4ab' stroke='%23c49070' stroke-width='1'/%3E%3Crect x='4' y='13' width='16' height='12' rx='1' fill='%23f99e74' stroke='%23c96a30' stroke-width='1'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Caption */
.bf-caption { font-size:12px; color:#aaa; text-align:center; margin-top:10px; margin-bottom:0; }

/* Cluster (reset MarkerCluster défaut) */
.bf-cluster { background:none !important; border:none !important; }

/* Cabane */
.bf-cabin-icon { background:none !important; border:none !important; cursor:pointer; }
.bf-cabin-icon svg { filter:drop-shadow(0 2px 4px rgba(0,0,0,0.22)); transition:transform 0.15s ease; }
.bf-cabin-icon:hover svg { transform:scale(1.12) translateY(-2px); }

/* Popup */
.bf-leaflet-popup .leaflet-popup-content-wrapper { border-radius:10px !important; box-shadow:0 6px 20px rgba(0,0,0,0.14) !important; padding:0 !important; overflow:hidden; }
.bf-leaflet-popup .leaflet-popup-content { margin:0 !important; width:auto !important; }
.bf-leaflet-popup .leaflet-popup-tip { box-shadow:none !important; }
.bf-popup { min-width:160px; }
.bf-popup-photo-wrap { width:100%; height:130px; overflow:hidden; }
.bf-popup-photo { width:100%; height:130px; object-fit:cover; display:block; }
.bf-popup-body { padding:10px 14px 12px; }
.bf-popup-city { font-size:14px; font-weight:600; }
.bf-popup-country { font-size:11px; color:#888; background:#f0f0ee; border-radius:3px; padding:1px 5px; margin-left:4px; }
.bf-popup-pseudo { font-size:12px; color:#555; margin:4px 0 2px; }
.bf-popup-message { font-size:12px; color:#444; font-style:italic; margin-bottom:5px; line-height:1.4; }
.bf-popup-orders { font-size:11px; color:#aaa; margin-top:4px; }

/* ══ ZONE AUTH ══ */
.bf-submit-section { margin-top:20px; }
.bf-auth-loading { font-size:13px; color:#aaa; }

.bf-auth-box {
    background:#fafaf8; border:1px solid #e5e5e0;
    border-radius:12px; padding:18px 20px;
    display:flex; flex-direction:column; gap:10px;
}
.bf-auth-box--info { background:#f0f6ff; border-color:#c0d8f5; }
.bf-auth-box--ok   { background:#f2fbf4; border-color:#b3e8be; }
.bf-auth-msg { margin:0; font-size:14px; color:#333; line-height:1.5; }
.bf-sub-status { margin:0; font-size:13px; color:#555; }

.bf-auth-btns { display:flex; gap:10px; flex-wrap:wrap; }
.bf-btn { display:inline-block; padding:9px 18px; border-radius:8px; font-size:13px; font-weight:500; text-decoration:none; transition:background 0.15s, transform 0.1s; }
.bf-btn--primary  { background:#1a1a1a; color:#fff; }
.bf-btn--primary:hover  { background:#333; transform:translateY(-1px); }
.bf-btn--secondary { background:#f0f0ee; color:#333; border:1px solid #ddd; }
.bf-btn--secondary:hover { background:#e5e5e2; transform:translateY(-1px); }

.bf-toggle-btn {
    align-self:flex-start; background:#1a1a1a; color:#fff; border:none;
    border-radius:8px; padding:10px 18px; font-size:13px; font-weight:500;
    cursor:pointer; transition:background 0.15s,transform 0.1s; font-family:inherit;
}
.bf-toggle-btn:hover { background:#333; transform:translateY(-1px); }
.bf-toggle-btn--ghost {
    background:none; color:#666; border:1px solid #d5d5d0;
    padding:8px 14px; font-size:12px;
}
.bf-toggle-btn--ghost:hover { background:#f5f5f3; color:#333; transform:none; }

/* ══ FORMULAIRE ══ */
.bf-form-panel { margin-top:14px; }
.bf-form { background:#fafaf8; border:1px solid #e5e5e0; border-radius:12px; padding:20px; display:flex; flex-direction:column; gap:14px; }
.bf-form-intro { margin:0; font-size:13px; color:#777; }

.bf-field-row { display:flex; gap:12px; }
.bf-field { display:flex; flex-direction:column; gap:5px; flex:1; }
.bf-field label { font-size:13px; font-weight:500; color:#333; }
.bf-field--sm { flex:0 0 110px; }
.bf-field-hint { font-size:12px; color:#999; margin:-8px 0 0; font-style:italic; }
.bf-req { color:#c0392b; }
.bf-field input,
.bf-field textarea,
.bf-field select {
    border:1px solid #d5d5d0; border-radius:7px; padding:9px 12px;
    font-size:14px; font-family:inherit; background:#fff;
    transition:border-color 0.15s,box-shadow 0.15s; width:100%; box-sizing:border-box;
}
.bf-field select {
    appearance:none; -webkit-appearance:none;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:right 12px center; padding-right:32px; cursor:pointer;
}
.bf-field input:focus,
.bf-field textarea:focus,
.bf-field select:focus { outline:none; border-color:#c96a30; box-shadow:0 0 0 3px rgba(201,106,48,0.12); }
.bf-field textarea { resize:vertical; min-height:64px; }

/* Zone photo */
.bf-photo-zone {
    border:2px dashed #d0d0cc; border-radius:10px;
    text-align:center; position:relative;
    transition:border-color 0.15s,background 0.15s; background:#fff;
    min-height:90px; overflow:hidden;
    /* PAS de cursor:pointer — seul le bouton est cliquable */
}
.bf-photo-zone.drag-over { border-color:#c96a30; background:#fdf5ef; }
.bf-photo-zone.has-photo { border-style:solid; border-color:#c96a30; }

.bf-photo-placeholder {
    display:flex; flex-direction:column; align-items:center;
    justify-content:center; gap:8px; padding:20px;
    color:#999; font-size:13px; pointer-events:none;
}
.bf-photo-icon { font-size:28px; }
.bf-photo-preview { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }

/* Actions photo sous la zone */
.bf-photo-actions { display:flex; gap:10px; align-items:center; margin-top:6px; flex-wrap:wrap; }
.bf-photo-pick-btn {
    background:#f5f5f3; color:#444; border:1px solid #d5d5d0;
    border-radius:6px; padding:7px 14px; font-size:13px;
    cursor:pointer; font-family:inherit; transition:background 0.15s;
}
.bf-photo-pick-btn:hover { background:#eae8e3; }
.bf-photo-remove-btn {
    background:none; color:#b02020; border:none;
    font-size:12px; cursor:pointer; font-family:inherit; padding:0;
    text-decoration:underline;
}
.bf-photo-remove-btn:hover { color:#800000; }

/* ══ SELECTEUR DE PICTOS ══ */
.bf-picto-selector {
    display:flex; gap:8px; flex-wrap:wrap; margin-bottom:10px;
}
.bf-picto-opt {
    display:flex; flex-direction:column; align-items:center; gap:4px;
    background:#fafaf8; border:2px solid #e5e5e0; border-radius:8px;
    padding:8px 10px; cursor:pointer; font-size:11px; color:#666;
    font-family:inherit; transition:border-color 0.15s, background 0.15s;
    min-width:56px;
}
.bf-picto-opt:hover { border-color:#c96a30; background:#fdf5ef; }
.bf-picto-opt--active { border-color:#c96a30; background:#fdf5ef; color:#c96a30; font-weight:500; }
.bf-picto-opt svg { display:block; }

.bf-picto-import { margin-top:4px; }
.bf-picto-import-label {
    display:inline-flex; align-items:center; gap:5px;
    font-size:12px; color:#666; cursor:pointer;
    text-decoration:underline; text-underline-offset:2px;
}
.bf-picto-import-label:hover { color:#333; }
.bf-picto-import-status { font-size:12px; margin-left:8px; }

/* Messages */
.bf-form-msg { padding:10px 14px; border-radius:7px; font-size:13px; line-height:1.5; }
.bf-form-msg--success { background:#edfbf0; color:#1a6b30; border:1px solid #b3e8be; }
.bf-form-msg--error   { background:#fff0f0; color:#b02020; border:1px solid #f5b8b8; }

/* Bouton soumettre */
.bf-submit-btn {
    align-self:flex-start; background:#c96a30; color:#fff; border:none;
    border-radius:8px; padding:11px 24px; font-size:14px; font-weight:500;
    cursor:pointer; transition:background 0.15s,transform 0.1s,opacity 0.15s; font-family:inherit;
}
.bf-submit-btn:hover:not(:disabled) { background:#a8541f; transform:translateY(-1px); }
.bf-submit-btn:disabled { opacity:0.6; cursor:not-allowed; }

/* Badges admin */
.bf-badge-logged    { background:#e8f4fd; color:#1a6b9a; padding:2px 7px; border-radius:10px; font-size:11px; }
.bf-badge-anonymous { background:#fdf5ef; color:#a85020; padding:2px 7px; border-radius:10px; font-size:11px; }

/* Responsive */
@media (max-width:520px) {
    .bf-stats { gap:8px; }
    .bf-stat  { padding:10px; }
    .bf-num   { font-size:20px; }
    .bf-field-row { flex-direction:column; }
    .bf-form  { padding:14px; }
    .bf-submit-btn { width:100%; text-align:center; }
    .bf-auth-btns { flex-direction:column; }
}
