/* Beau panneau de filtres à droite */
.filter-panel {
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 72px;            /* étroit */
    height: 320px;          /* assez haut */
    background: rgba(24, 28, 35, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    backdrop-filter: blur(4px);
    color: #fff;
    z-index: 2000;
    overflow: visible; /* doit laisser dépasser l'étiquette du filtre 1 vers la gauche */
    display: flex;
    flex-direction: column;
}

.filter-header {
    font-weight: 600;
    font-size: 13px;
    text-align: center;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    letter-spacing: .3px;
}

.filter-buttons {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 10px 0;
    gap: 10px;
}

.filter-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 8px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform .08s ease, background .2s ease, border-color .2s ease;
    position: relative; /* nécessaire pour positionner le label du filtre 1 */
    overflow: visible;
}
.filter-btn:hover { transform: translateY(-1px); border-color: #fff; }
.filter-btn:active { transform: translateY(0); }
.filter-btn:focus-visible { outline: 2px solid #7cc0ff; outline-offset: 2px; }
.filter-btn.active { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.25), inset 0 1px 0 rgba(255,255,255,0.45); }

/* Filtre 1: image dédiée */
.filter-btn[data-filter="f1"] {
    background: #0e1720 url('img/filtres/filtre1.png') center/cover no-repeat;
}
/* Label à gauche, collé à l'image */
.filter-btn[data-filter="f1"]::before {
    content: "Biodiversité par effort d'observation";
    position: absolute;
    right: 100%; /* collé à gauche du bouton */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.9);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-right: none; /* pour éviter double bord avec le bouton */
    padding: 6px 10px;
    border-radius: 8px 0 0 8px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    pointer-events: none; /* ne bloque pas le clic sur la carte */
    opacity: 0;
    transform-origin: right center;
    transition: opacity .15s ease, transform .15s ease;
}
/* variantes de couleur pour donner un repère visuel (autres filtres) */
.filter-btn[data-filter="f2"] {
    background: #0e1720 url('img/filtres/filtre2.png') center/cover no-repeat;
}
.filter-btn[data-filter="f2"]::before {
    content: "Corrélation latitude - diversité";
    position: absolute;
    right: 100%; /* collé à gauche du bouton */
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.9);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-right: none; /* pour éviter double bord avec le bouton */
    padding: 6px 10px;
    border-radius: 8px 0 0 8px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    pointer-events: none;
    opacity: 0;
    transform-origin: right center;
    transition: opacity .15s ease, transform .15s ease;
}

/* Afficher le label au survol, au focus clavier, ou quand le bouton est actif */
.filter-btn:hover::before,
.filter-btn:focus-visible::before,
.filter-btn.active::before {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}
.filter-btn[data-filter="f3"] { background: linear-gradient(180deg, #383e3c66, #383e3c66); }
.filter-btn[data-filter="f4"] { background: linear-gradient(180deg, #383e3c66, #383e3c66); }

.quick-filter-btn {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.35);
    border-radius: 8px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.quick-filter-btn:hover {
    background: rgba(255,255,255,0.32);
    border-color: #fff;
}
html, body, #map {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Police globale: Ubuntu partout */
html, body, button, input, select, textarea {
    font-family: 'Ubuntu', Arial, Helvetica, sans-serif;
}

#map {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
}

/* Panneau espèces en bas à gauche */
#species-panel {
    position: fixed;
    left: 12px;
    bottom: 12px;
    width: 280px;
    max-height: 48vh; /* un peu plus haut pour éviter de couper le bouton */
    background: rgba(24, 28, 35, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.3);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    overflow: hidden;
    backdrop-filter: blur(2px);
    z-index: 1000;
    padding: 10px;
    padding-bottom: 14px; /* marge pour le bouton Réinitialiser */
}

.species-header {
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.species-list {
    max-height: 34vh;
    overflow: auto;
}

.species-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.species-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.species-item input[type="checkbox"] {
    min-width: 16px;
    min-height: 16px;
}

.taxonomy-controls {
    padding: 8px 10px;
}
.tax-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.tax-row label {
    font-size: 12px;
}
.tax-row select {
    width: 100%;
}
.tax-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 6px;
}
.tax-actions button {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.tax-actions button:hover {
    background: rgba(255,255,255,0.25);
}

/* Overlay de chargement centré */
#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: none; /* visible uniquement pendant le chargement */
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 2000;
}

#loading-overlay.active {
    display: flex;
}

#loading-overlay .spinner {
    width: 56px;
    height: 56px;
    border: 6px solid rgba(255,255,255,0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    pointer-events: none; /* ne bloque pas les clics vers le bouton */
}

#loading-overlay .loading-text {
    color: #fff;
    margin-top: 12px;
    font-weight: 600;
}

#loading-overlay .cancel-btn {
    margin-top: 10px;
    background: #c62828;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
}
#loading-overlay .cancel-btn:hover {
    background: #b71c1c;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.leaflet-control-layers {
    z-index: 1000;
}

/* Attribution discrète et déplacée en bas à gauche (on conserve les crédits fournisseurs) */
.leaflet-control-attribution {
opacity: 0;
}
.leaflet-control-attribution:hover { opacity: 0; }

/* Panneaux côté gauche, empilés au-dessus du panel taxonomie */
.limit-panel {
    position: fixed;
    left: 12px;
    width: 280px; /* même largeur que taxonomie */
    background: rgba(24, 28, 35, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.3);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    overflow: hidden;
    backdrop-filter: blur(2px);
    z-index: 1000;
    padding-right: 10px;
    padding-left: 10px;
}
.limit-header {
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.limit-controls { padding: 8px 10px; }
.limit-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
.limit-row label { font-size: 12px; }

/* Slider simple (une poignée) avec piste bleue/rouge dynamique */
.range-single { position: relative; height: 28px; --value-pct: 0%; --active-color: #2f80ff; }
.range-single.overlimit { --active-color: #e53935; }
.range-single::before { /* piste grise */
    content: '';
    position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
    height: 6px; background: rgba(255,255,255,0.35); border-radius: 4px; pointer-events: none;
}
.range-single::after { /* segment actif */
    content: '';
    position: absolute; left: 0; width: var(--value-pct);
    top: 50%; transform: translateY(-50%);
    height: 6px; background: var(--active-color); border-radius: 4px; pointer-events: none;
}
.range-single input[type="range"] {
    position: absolute; inset: 0; width: 100%; height: 28px;
    pointer-events: auto; appearance: none; -webkit-appearance: none; background: none; z-index: 2;
}
.range-single input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto; -webkit-appearance: none; height: 16px; width: 16px;
    background: #fff; border-radius: 50%; border: 2px solid #111;
}
.range-single input[type="range"]::-moz-range-thumb {
    pointer-events: auto; height: 16px; width: 16px; background: #fff; border-radius: 50%; border: 2px solid #111;
}
.range-single input[type="range"]::-webkit-slider-runnable-track { height: 6px; background: transparent; border-radius: 4px; }
.range-single input[type="range"]::-moz-range-track { height: 6px; background: transparent; border-radius: 4px; }

/* Boutons de tri sous le slider documents */
.limit-row.sort { margin-top: 6px; }
/* Nouveau: groupes de tri compacts */
.sort-groups {
    display: inline-flex;
    gap: 8px;
    overflow-x: auto; /* barre horizontale si ça dépasse */
    overflow-y: hidden;
    padding-bottom: 6px; /* espace pour la barre de scroll */
    -webkit-overflow-scrolling: touch; /* défilement fluide */
}
.sort-group {
    display: grid;
    grid-template-columns: auto auto; /* pas d'espace extensible entre l'icône et les flèches */
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: rgba(24, 28, 35, 0.65);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    flex: 0 0 auto; /* ne pas se comprimer, pour activer le scroll */
}
.sort-group-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.sort-pair { display: inline-flex; gap: 6px; }
.sort-mini-btn {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
    border: 1px solid rgba(255,255,255,0.22);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: transform .08s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 2px 10px rgba(0,0,0,0.25);
}
.sort-mini-btn:hover { transform: translateY(-1px); border-color: #ffffff; }
.sort-mini-btn:active { transform: translateY(0); }
.sort-mini-btn:focus-visible { outline: 2px solid #7cc0ff; outline-offset: 2px; }
.sort-mini-btn.active {
    background: linear-gradient(180deg, rgba(124,192,255,0.35), rgba(124,192,255,0.18));
    border-color: #7cc0ff;
    box-shadow: 0 0 0 2px rgba(124,192,255,0.18), inset 0 1px 0 rgba(255,255,255,0.35);
}

/* Icônes flèches pour mini boutons */
.sort-mini-btn .icon {
    display: inline-block;
    width: 14px; height: 14px;
    background-color: #ffffff;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: 14px 14px; mask-size: 14px 14px;
}
.sort-mini-btn .icon-up {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5l-7 7h4v7h6v-7h4z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5l-7 7h4v7h6v-7h4z'/%3E%3C/svg%3E");
}
.sort-mini-btn .icon-down {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 19l7-7h-4V5H9v7H5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 19l7-7h-4V5H9v7H5z'/%3E%3C/svg%3E");
}

/* Icônes de titre avec PNG (blanc via filter) */
.sort-group-title .icon { display: inline-block; width: 18px; height: 18px; background: transparent no-repeat center/contain; }
.sort-group-title .icon-id { background-image: url('img/tri/id.png'); filter: brightness(0) invert(1); }
.sort-group-title .icon-globe-lon { background-image: url('img/tri/earthlongitude.png'); filter: brightness(0) invert(1); }
.sort-group-title .icon-globe-lat { background-image: url('img/tri/earthlatitude.png'); filter: brightness(0) invert(1); }

/* Styles pour la photo dans le popup */
.leaflet-popup-content .popup-photo {
    max-width: 160px;
    max-height: 100px;
    width: auto;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 0 auto 6px auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.leaflet-popup-content .img-container { text-align: center; }

.date-panel {
    position: fixed;
    left: 12px;
    width: 280px; /* même largeur que taxonomie */
    background: rgba(24, 28, 35, 0.75);
    border: 1px solid rgba(0, 0, 0, 0.3);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    overflow: hidden;
    backdrop-filter: blur(2px);
    z-index: 1000;
    padding-right: 10px;
    padding-left: 10px;
}
.date-header {
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
.date-controls {
    padding: 8px 10px;
}
.date-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-bottom: 8px;
}
.date-row label {
    font-size: 12px;
}
.date-row input[type="range"] {
    width: 100%;
}

/* Slider double (deux poignées) présenté comme un seul contrôle */
.date-row.dual {
    gap: 10px;
}
.range-dual {
    position: relative;
    height: 28px;
}
.range-dual::before {
    /* piste grise de fond */
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: rgba(255,255,255,0.35);
    border-radius: 4px;
    pointer-events: none;
}
.range-dual::after {
    /* segment actif (entre min et max) en bleu */
    content: '';
    position: absolute;
    left: var(--min-pct, 0%);
    right: calc(100% - var(--max-pct, 100%));
    top: 50%;
    transform: translateY(-50%);
    height: 6px;
    background: #2f80ff; /* bleu */
    border-radius: 4px;
    pointer-events: none;
}
.range-dual input[type="range"] {
    position: absolute;
    left: 0; right: 0;
    top: 0; bottom: 0;            /* occupe toute la hauteur du conteneur */
    width: 100%; height: 28px;    /* même hauteur que le conteneur pour centrer verticalement */
    pointer-events: none; /* superpose les sliders, active seulement le pouce */
    appearance: none;
    -webkit-appearance: none;
    background: none;
    z-index: 2; /* laisser la piste dessous, les pouces au-dessus */
}
.range-dual input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    height: 16px; width: 16px;
    background: #fff; border-radius: 50%; border: 2px solid #111;
}
.range-dual input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    height: 16px; width: 16px;
    background: #fff; border-radius: 50%; border: 2px solid #111;
}
.range-dual input[type="range"]::-webkit-slider-runnable-track {
    height: 6px; background: transparent; border-radius: 4px;
}
.range-dual input[type="range"]::-moz-range-track {
    height: 6px; background: transparent; border-radius: 4px;
}

/* ---- Thème noir pour les contrôles Leaflet (zoom + calques) ---- */
/* Barres et boutons */
.leaflet-bar a,
.leaflet-bar a:hover,
.leaflet-control-zoom a {
    background: #111 !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.25) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.leaflet-bar a:hover { background: #1a1a1a !important; }
.leaflet-bar a:focus-visible { outline: 2px solid #7cc0ff; outline-offset: 2px; }

/* Contrôle calques (toggle + panneau) */
.leaflet-control-layers {
    background: #111 !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.leaflet-control-layers-expanded {
    background: #111 !important;
    color: #fff !important;
}
.leaflet-control-layers-list,
.leaflet-control-layers-base,
.leaflet-control-layers-overlays {
    color: #fff !important;
}
.leaflet-control-layers-separator {
    border-top: 1px solid rgba(255,255,255,0.25) !important;
}
.leaflet-control-layers label { color: #fff !important; }

/* Icône du bouton calques: inverser pour être visible sur fond noir */
.leaflet-control-layers-toggle {
    position: relative;
    background-color: #111 !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
    border-radius: 4px;
    background-image: none !important; /* on supprime l'icône d'origine */
}
.leaflet-control-layers-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: #ffffff; /* couleur de l'icône */
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3L3 9l9 6 9-6-9-6zm0 8.5L3 7v3l9 5.5L21 10V7l-9 4.5zm0 6L3 13v3l9 5 9-5v-3l-9 4.5z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3L3 9l9 6 9-6-9-6zm0 8.5L3 7v3l9 5.5L21 10V7l-9 4.5zm0 6L3 13v3l9 5 9-5v-3l-9 4.5z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: 18px 18px; mask-size: 18px 18px; /* icône plus nette */
    pointer-events: none;
}

/* Panneau Ajouter (en bas à droite) */
.add-panel {
    position: fixed;
    right: 12px;
    bottom: 12px;
    background: rgba(24, 28, 35, 0.85);
    color: #fff;
    border: 1px solid rgba(0,0,0,0.3);
    padding: 10px 12px 10px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex; align-items: center; gap: 10px;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
    z-index: 1100;
}
.add-panel .add-text { font-weight: 600; }
.add-panel .add-icon {
    width: 18px; height: 18px; background-color: #fff;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z'/%3E%3C/svg%3E");
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    -webkit-mask-size: 18px 18px; mask-size: 18px 18px;
}
.add-panel:hover {
    transform: translateY(-1px);
    background: rgba(24, 28, 35, 0.9);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* Modal générique */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: none; align-items: center; justify-content: center; z-index: 2000; }
.modal[aria-hidden="false"] { display: flex; }
.modal-content { width: min(760px, 92vw); max-height: 86vh; overflow: auto; background: #17202a; color: #fff; border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,0.35); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.15); }
.modal-close { background: transparent; color: #fff; border: none; font-size: 22px; cursor: pointer; }
.modal-body { padding: 12px 14px 16px 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.form-grid label { display: grid; gap: 4px; font-size: 12px; }
.form-grid input { padding: 6px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: #fff; }
.form-extra { margin-top: 12px; }
.extra-header { font-weight: 600; margin-bottom: 6px; }
.extra-list .extra-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.extra-row input { padding: 6px 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.08); color: #fff; }
.extra-row .remove { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.extra-row .remove:hover { background: rgba(255,255,255,0.2); }
.extra-add { background: rgba(124,192,255,0.15); color: #fff; border: 1px solid rgba(124,192,255,0.35); border-radius: 6px; padding: 6px 10px; cursor: pointer; }
.extra-add:hover { background: rgba(124,192,255,0.25); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.form-actions .primary { background: #2f80ff; color: #fff; border: 1px solid rgba(255,255,255,0.25); padding: 8px 12px; border-radius: 6px; cursor: pointer; }
.form-actions .secondary { background: rgba(255,255,255,0.12); color: #fff; border: 1px solid rgba(255,255,255,0.25); padding: 8px 12px; border-radius: 6px; cursor: pointer; }

/* Titre centré en haut */
.title-panel {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(24,28,35,0.85);
    color: #fff;
    border: 1px solid rgba(0,0,0,0.3);
    padding: 8px 16px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    z-index: 1400;
    font-size: 24px; /* taille moyenne */
    letter-spacing: 0.5px;
}

/* Toasts (alertes in-app) */
.toast-container {
    position: fixed;
    right: 12px;
    bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 3000;
    pointer-events: none; /* clics passent à travers sauf sur les boutons */
}
.toast {
    min-width: 260px;
    max-width: min(420px, 90vw);
    background: rgba(24, 28, 35, 0.92);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: auto;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .toast-text { font-size: 13px; line-height: 1.35; }
.toast .toast-close {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    width: 28px; height: 28px;
    cursor: pointer;
}
.toast .toast-close:hover { background: rgba(255,255,255,0.12); }
.toast.info { border-color: rgba(124,192,255,0.35); }
.toast.warn { border-color: rgba(255,180,0,0.5); box-shadow: 0 0 0 1px rgba(255,180,0,0.15), 0 10px 30px rgba(0,0,0,0.35); }
.toast.error { border-color: rgba(229,57,53,0.6); box-shadow: 0 0 0 1px rgba(229,57,53,0.15), 0 10px 30px rgba(0,0,0,0.35); }

