/* inca.panel.css — Panneaux, alertes et composants UI Inca */

/* ═══════════════════════════════════════════════
   SLIDERS
   ═══════════════════════════════════════════════ */
.inca-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 22px;
    background: transparent;
    border-radius: 3px;
    outline: none;
}

.inca-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
}

.inca-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    margin-top: -7px;
    appearance: none;
    width: 22px;
    height: 22px;
    background: radial-gradient(circle,
            #ffffff 0%,
            #b0c4c8 30%,
            #6b8085 60%,
            #3a4a50 100%);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.inca-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: radial-gradient(circle,
            #ffffff 0%,
            #b0c4c8 30%,
            #6b8085 60%,
            #3a4a50 100%);
    border-radius: 50%;
    border: 1px solid #3a4a50;
    cursor: pointer;
    transition: background 0.3s ease;
}

.inca-slider::-ms-thumb {
    width: 18px;
    height: 18px;
    background: radial-gradient(circle,
            #ffffff 0%,
            #b0c4c8 30%,
            #6b8085 60%,
            #3a4a50 100%);
    border-radius: 50%;
    border: 1px solid #3a4a50;
    cursor: pointer;
    transition: background 0.3s ease;
}

.inca-slider:hover::-webkit-slider-thumb {
    box-shadow: 0 0 10px 3px rgba(173, 216, 230, 0.6);
    background: radial-gradient(circle,
            #ffffff 0%,
            #cde5f0 30%,
            #7aaab5 60%,
            #3a4a50 100%);
}

.inca-slider:hover::-moz-range-thumb {
    box-shadow: 0 0 10px 3px rgba(173, 216, 230, 0.6);
    background: radial-gradient(circle,
            #ffffff 0%,
            #cde5f0 30%,
            #7aaab5 60%,
            #3a4a50 100%);
}

.inca-slider:hover::-ms-thumb {
    box-shadow: 0 0 10px 3px rgba(173, 216, 230, 0.6);
    background: radial-gradient(circle,
            #ffffff 0%,
            #cde5f0 30%,
            #7aaab5 60%,
            #3a4a50 100%);
}

.inca-slider:hover::-webkit-slider-runnable-track {
    box-shadow: 0 0 6px 2px rgba(255, 255, 255, 0.3);
}

.inca-slider:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.inca-slider-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0;
}

.inca-slider-label {
    font-weight: 300;
    margin-bottom: 4px;
}

.inca-slider-value {
    min-width: 40px;
    text-align: right;
    font-size: 0.9rem;
}


/* ═══════════════════════════════════════════════
   MESSAGE POPUP
   ═══════════════════════════════════════════════ */
/* Message temporaire de la carte (AlertMixin) : bandeau centré en haut, au-dessus de l'UI */
.inca-message {
    display: none;
    position: absolute;
    top: var(--inca-top, 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    z-index: 1002;
    pointer-events: none;
    /* Même famille que l'en-tête : verre, rayon et ombre partagés (variables de inca.map.css) ; teinte dorée = message */
    border-radius: var(--inca-glass-radius, 4px);
    background: rgba(243, 202, 113, 0.55);
    border: 1px solid var(--inca-glass-border, transparent);
    -webkit-backdrop-filter: blur(var(--inca-glass-blur, 0px));
    backdrop-filter: blur(var(--inca-glass-blur, 0px));
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: var(--inca-glass-shadow, 0 0 10px rgba(0, 0, 0, 0.5));
}

.inca-message.visible {
    display: block;
}

.inca-message-popup-content {
    font-size: 1.1rem;
    letter-spacing: 1.5pt;
    font-weight: 100;
    padding: 10px 15px;
    text-align: center;
    height: fit-content !important;
}


/* ═══════════════════════════════════════════════
   PANNEAU TOGGLABLE
   ═══════════════════════════════════════════════ */
.inca-panel-toggleable {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(64, 98, 109, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    z-index: 999;
    font-size: 14px;
    pointer-events: auto;
    opacity: 0.4;
    width: 180px;
    height: 50px;
    overflow: hidden;
    transition:
        opacity 0.3s ease,
        width 0.3s ease,
        height 0.3s ease,
        background 0.3s ease;
    display: flex;
    flex-direction: column;
}

.inca-panel-toggleable.expanded,
.inca-panel-toggleable:hover:not(.expanded) {
    opacity: 1;
    background: rgba(64, 98, 109, 0.5);
    width: 350px;
    height: 600px;
}

.inca-panel-toggleable.bottom-right {
    top: auto;
    bottom: 12px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.tools-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 8px;
    margin-top: 10px;
}

.tools-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
}

.tools-section label {
    font-size: 0.9em;
    font-weight: 300;
    color: #f0f0f0;
}

.tools-section input[type="range"] {
    width: 100%;
}

.tools-section span {
    font-size: 0.85em;
    color: #ccc;
    align-self: flex-end;
}

.tools-content label,
.tools-content input[type="range"],
.tools-content fieldset,
.tools-content span {
    flex-shrink: 0;
}

.tools-content fieldset {
    border: 1px solid #444;
    border-radius: 6px;
    padding: 8px;
}

.tools-content input[type="range"] {
    width: 100%;
    margin: 4px 0;
}

.tools-content::-webkit-scrollbar {
    width: 6px;
}

.tools-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}


/* ═══════════════════════════════════════════════
   PANNEAU GÉNÉRIQUE (.inca-panel)
   ═══════════════════════════════════════════════ */
.inca-panel {
    position: relative;
    left: 0;
    top: 0;
    flex: 1 1 auto;
    width: 100% !important;
    height: 100% !important;
    display: flex;
    flex-direction: column;
    background: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 16px;
    color: white;
    font-size: 0.95rem;
    overflow: auto;
}

.inca-panel-title {
    font-size: 1em;
    font-weight: 300;
    margin: 0 0 10px;
    color: #def1f3;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.inca-section {
    margin: 10px;
    padding: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
}

.inca-section-title {
    font-size: 0.8rem;
    font-weight: 300;
    color: #def1f3;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}


/* ═══════════════════════════════════════════════
   BOUTONS
   ═══════════════════════════════════════════════ */
.inca-button {
    max-width: 200px;
    height: auto;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.90rem !important;
    letter-spacing: 1.5pt !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition:
        background 0.3s ease,
        transform 0.2s ease,
        box-shadow 0.3s ease;
}

.inca-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.inca-button:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.inca-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.inca-button.active {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: #fff !important;
    transform: scale(1.02);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.inca-button-primary {
    background: rgba(64, 98, 109, 0.6) !important;
    border-color: rgba(64, 98, 109, 0.9) !important;
}

.inca-button-primary:hover {
    background: rgba(64, 98, 109, 0.8) !important;
}

.inca-button-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.inca-button-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
}

.inca-button-center .button-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.panel-toggle-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.panel-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
}


/* ═══════════════════════════════════════════════
   PANNEAU INFO (bas gauche)
   ═══════════════════════════════════════════════ */
.inca-info-panel {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(64, 98, 109, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: #fff;
    border-radius: 8px;
    z-index: 998;
    font-size: 14px;
    padding: 10px;
    pointer-events: auto;
    opacity: 0.4;
    width: 400px;
    height: 80px;
    overflow: hidden;
    transition:
        opacity 0.3s ease,
        width 0.3s ease,
        height 0.3s ease,
        background 0.3s ease;
}

.inca-info-panel.expanded {
    opacity: 1;
    background: rgba(64, 98, 109, 0.5);
    width: 600px;
    height: auto;
    max-height: 400px;
    overflow-y: auto;
}

.inca-info-panel:not(.expanded):hover {
    opacity: 1;
    background: rgba(64, 98, 109, 0.4);
    width: 600px;
    height: auto;
    max-height: 400px;
    overflow-y: auto;
}

.inca-info-panel button {
    background: none;
    border: none;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.inca-info-panel button:hover {
    color: #ddd;
}

.inca-info-panel .info-content {
    margin-top: 5px;
}


/* ═══════════════════════════════════════════════
   DÉTAIL — LABELS ET HINTS
   ═══════════════════════════════════════════════ */
.detail-level-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
}

.detail-level-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 8px;
    font-style: italic;
    min-height: 1.2em;
    transition: color 0.2s ease;
}
