/* ===== RECHERCHE DE MODS STEAM - STYLE PROFESSIONNEL ===== */

/* Champ de recherche principal */
#mod_search {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 2px solid #3e4f66;
    border-radius: 8px;
    background-color: #2a3642;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#mod_search:focus {
    outline: none;
    border-color: #00a99f;
    box-shadow: 0 0 0 3px rgba(0, 169, 159, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

#mod_search::placeholder {
    color: #8a9ba8;
    font-style: italic;
}

/* Conteneur des résultats */
#mod_results {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #3e4f66;
    border-radius: 8px;
    margin-bottom: 20px;
    background-color: #1a2531;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    /* Scrollbar personnalisée */
    scrollbar-width: thin;
    scrollbar-color: #00a99f #2a3642;
}

#mod_results::-webkit-scrollbar {
    width: 8px;
}

#mod_results::-webkit-scrollbar-track {
    background: #2a3642;
    border-radius: 4px;
}

#mod_results::-webkit-scrollbar-thumb {
    background: #00a99f;
    border-radius: 4px;
}

#mod_results::-webkit-scrollbar-thumb:hover {
    background: #007f75;
}

/* Résultats individuels */
.mod-result {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #3e4f66;
    transition: all 0.2s ease;
    color: #fff;
    font-size: 14px;
    position: relative;
    overflow: hidden;
}

.mod-result:last-child {
    border-bottom: none;
}

.mod-result:hover {
    background-color: #3e4f66;
    padding-left: 20px;
    transform: translateX(4px);
}

.mod-result:hover::before {
    content: "→";
    position: absolute;
    left: 8px;
    color: #00a99f;
    font-weight: bold;
}

.mod-result.selected {
    background-color: #007f75;
    color: #fff;
    font-weight: 600;
    border-left: 4px solid #00a99f;
}

.mod-result.selected::after {
    content: "✓";
    position: absolute;
    right: 16px;
    color: #fff;
    font-weight: bold;
}

.mod-result.loading {
    font-style: italic;
    color: #8a9ba8;
    background-color: #2a3642;
    cursor: default;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.mod-result.error {
    color: #ff6b6b;
    font-weight: bold;
    background-color: rgba(255, 107, 107, 0.1);
    cursor: default;
}

/* Conteneur des mods sélectionnés */
#selected_mods {
    margin: 15px 0;
    padding: 16px;
    border: 2px dashed #3e4f66;
    border-radius: 8px;
    background: linear-gradient(135deg, #2a3642 0%, #1e2a36 100%);
    min-height: 60px;
    transition: all 0.3s ease;
}

#selected_mods:hover {
    border-color: #00a99f;
    box-shadow: 0 4px 12px rgba(0, 169, 159, 0.1);
}

.no-mods {
    color: #8a9ba8;
    font-style: italic;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

/* Mods sélectionnés individuels */
.mod-selected {
    display: inline-flex;
    align-items: center;
    margin: 6px;
    padding: 8px 12px 8px 16px;
    background: linear-gradient(135deg, #00a99f 0%, #007f75 100%);
    color: white;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 169, 159, 0.3);
    transition: all 0.2s ease;
    max-width: 250px;
}

.mod-selected:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 169, 159, 0.4);
}

.mod-selected span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.remove-mod {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    margin-left: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-mod:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.remove-mod:active {
    transform: scale(0.95);
}

/* ===== STYLES GÉNÉRAUX DU FORMULAIRE ===== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    color: #fff;
    margin-bottom: 8px;
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    background-color: #2a3642;
    border: 2px solid #3e4f66;
    color: #fff;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="url"]:focus,
.form-group input[type="date"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00a99f;
    box-shadow: 0 0 0 3px rgba(0, 169, 159, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.form-group select option {
    background-color: #2a3642;
    color: #fff;
    padding: 8px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Boutons */
.btn-primary {
    background: linear-gradient(135deg, #00a99f 0%, #007f75 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 169, 159, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #007f75 0%, #006663 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 169, 159, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 169, 159, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin-left: 12px;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Form hints et tooltips */
.form-hint {
    font-size: 12px;
    color: #8a9ba8;
    margin-top: 6px;
    font-style: italic;
}

.tooltip-box {
    position: absolute;
    background: #1a2531;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    border: 1px solid #3e4f66;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    #mod_search {
        padding: 10px 14px;
        font-size: 16px; /* Évite le zoom sur iOS */
    }
    
    .mod-selected {
        max-width: 180px;
        font-size: 12px;
        margin: 4px;
        padding: 6px 10px 6px 12px;
    }
    
    .remove-mod {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        margin: 8px 0;
        text-align: center;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Évite le zoom sur iOS */
    }
}

@media (max-width: 480px) {
    #selected_mods {
        padding: 12px;
    }
    
    .mod-selected {
        max-width: 140px;
        font-size: 11px;
    }
    
    #mod_results {
        max-height: 250px;
    }
}