/* --- SEGMENTED CONTROL (Radios) --- */
.segmented-control {
    display: flex;
    background: var(--glass);
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
    border: 1px solid var(--border);
}

.segment-option {
    flex: 1;
    position: relative;
    cursor: pointer;
    text-align: center;
}

.segment-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.segment-option span {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.segment-option input:checked+span {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* --- CUSTOM SELECT (Select2-like) --- */
.custom-select {
    position: relative;
    width: 100%;
    margin-bottom: 0.5rem;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    min-height: 42px;
}

.custom-select-trigger:hover {
    border-color: var(--primary, #5865F2);
}

.custom-select-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-trigger i {
    opacity: 0.6;
    margin-left: 8px;
}

.custom-select-options {
    position: absolute;
    top: 105%;
    left: 0;
    right: 0;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.custom-select.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select-search {
    padding: 8px;
    position: sticky;
    top: 0;
    background: var(--panel);
    z-index: 2;
    border-bottom: 1px solid var(--border);
}

.custom-select-search input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 6px 8px;
    color: #eee;
    font-size: 0.85rem;
    outline: none;
}

.custom-select-search input:focus {
    border-color: var(--primary, #5865F2);
}

.custom-select-group-label {
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted, #aaa);
    background: rgba(255, 255, 255, 0.02);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.custom-select-group-label:first-child {
    margin-top: 0;
}

.custom-select-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #dbdee1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-select-option:hover {
    background: var(--accent);
    color: white;
}

.custom-select-option.selected {
    background: var(--glass-hover);
    color: var(--accent);
}

.custom-select-option.selected:hover {
    background: var(--primary, #5865F2);
    color: white;
}

.custom-select-empty {
    padding: 12px;
    text-align: center;
    color: var(--text-muted, #aaa);
    font-size: 0.85rem;
    font-style: italic;
}

/* --- PREMIUM OPTION ITEM --- */
.option-item-premium {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
    margin-bottom: 8px;
    min-height: 54px;
}

.option-item-premium:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(124, 58, 237, 0.5);
}

.option-info {
    min-width: 0;
    text-align: left;
}

.option-title {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.option-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

.option-control {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.input-field-compact {
    width: 80px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--text-main);
    font-size: 0.9rem;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
}

.input-field-compact:focus {
    border-color: var(--accent);
}

/* Supprimer les flèches sur Chrome, Safari, Edge, Opera */
.input-field-compact::-webkit-outer-spin-button,
.input-field-compact::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Supprimer les flèches sur Firefox */
.input-field-compact[type=number] {
    -moz-appearance: textfield;
}

/* --- PREMIUM GUIDE MODAL --- */
.guide-card {
    background: rgba(15, 20, 36, 0.85);
    backdrop-filter: blur(25px) saturate(160%);
    border-radius: 24px;
    width: 95%;
    max-width: 750px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    animation: guideSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes guideSlideUp {
    from { transform: translateY(30px) scale(0.98); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.guide-hero {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2) 0%, rgba(6, 182, 212, 0.1) 100%);
    padding: 3rem 2rem 2.5rem 2rem;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.btn-close-guide {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.2);
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-guide:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: rotate(90deg);
}

.guide-hero-icon {
    width: 80px;
    height: 80px;
    background: rgba(124, 58, 237, 0.15);
    border: 2px solid rgba(124, 58, 237, 0.3);
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    color: var(--accent);
    font-size: 2.2rem;
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.3);
    transform: rotate(-5deg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.guide-card:hover .guide-hero-icon {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 15px 35px rgba(124, 58, 237, 0.5);
}

.guide-hero h3 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.guide-body {
    padding: 2rem;
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.6;
    max-height: 60vh;
    overflow-y: auto;
}

.guide-body h3, .guide-body h4 {
    color: white;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.guide-body h3:first-child, .guide-body h4:first-child {
    margin-top: 0;
}

.guide-body h3 i, .guide-body h4 i {
    color: var(--primary, #5865F2);
    font-size: 1.2rem;
}

.guide-body ul {
    list-style-type: none;
    padding-left: 0;
}

.guide-body li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: #dbdee1;
}

.guide-body li::before {
    content: "•";
    color: var(--primary, #5865F2);
    position: absolute;
    left: 0;
    font-size: 1.5rem;
    line-height: 1rem;
    top: 4px;
}

.guide-body li b {
    color: white;
}

.guide-body .guide-pro-tip {
    background: rgba(235, 69, 158, 0.1);
    border-left: 4px solid var(--accent, #EB459E);
    padding: 1rem 1.2rem;
    border-radius: 0 8px 8px 0;
    margin-top: 1.5rem;
    color: #e8e8e8;
}

.guide-body .guide-pro-tip strong {
    color: var(--accent, #EB459E);
    display: block;
    margin-bottom: 0.3rem;
}

.guide-footer {
    padding: 1.5rem;
    background: rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.03);
    text-align: center;
}

/* =========================================================
   📱 MOBILE FIRST UI COMPONENTS
   ========================================================= */

@media (max-width: 768px) {
    /* Custom Select Touch Optimization */
    .custom-select-trigger {
        min-height: 48px; /* Easier to tap */
        padding: 0.8rem 1.2rem;
    }
    
    .custom-select-option {
        min-height: 48px;
        padding: 12px 16px; /* Larger hit areas */
        font-size: 0.95rem;
    }
    
    .custom-select-options {
        max-height: 40vh; /* Don't cover entire screen, but allow enough scroll */
    }

    /* Segmented Control Touch Optimization */
    .segmented-control {
        flex-direction: column; /* Stack on very small screens, or allow wrap */
    }
    
    .segment-option span {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Guide Card */
    .guide-card {
        width: 100%;
        border-radius: 16px 16px 0 0;
        margin: auto 0 0 0;
    }
}